redhendev / python Goto Github PK
View Code? Open in Web Editor NEWA repo for python, while I'm learning
A repo for python, while I'm learning
Hey, (umm idk ur name).... @RedHenDev
Can you tell what's happening?
I tried to code it myself i got the same output. So I decided to use you code and ....... you guessed it , same glitched terrain.
I just downloaded the whole repo and executed it just like that, without even touching the code.
Btw its me whose pronounciation you had nailed... Anushtubh
Umm, so what now? @RedHenDev
Ok, so as you said in the last issue, I did apply the new model and texture everywhere i went in the code.:sweat_smile:
But, after the blocks combine into a megaset, the the texture is no longer there. Now, for the first time ever i found a solution. ๐. So wherever I saw a model without the block
in it, I replaced it with block
and replaced the texture to block_texture
.
But still the issue wasnt resolved but i found the solution in this if statement. on line 183
So here it is @RedHenDev :
When we combine the megsets,
if subDic.get('x'+str(x)+'z'+str(z))!='i': subCubes[currentCube].enable() subCubes[currentCube].x = x subCubes[currentCube].z = z subDic['x'+str(x)+'z'+str(z)] = 'i' subCubes[currentCube].parent = subsets[currentSubset] y = subCubes[currentCube].y = genPerlin(x,z) g = nMap(y,-8,21,12,243) g += random.randint(-12,12) subCubes[currentCube].color = color.rgb(0,g,0) subCubes[currentCube].disable() currentCube+=1
In the last part, I added : subCubes[currentCube].model = 'block' subCubes[currentCube].texture = 'block_texture'
(Sorry its not indented or placed underneath eachother or something)
So Before Combine (old code)-
After Combine - (old code)-
look at the texture persistnce.....
Now Before Combine(my new code)-
After Combine Megasets(new code)-
Now look at the Texture persistence...
You can also change it in the repo, Just search for 'model' and change it to 'block' and search 'texture' to 'block_texture'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.