Blog Layout

Devlog #2: World Generation

183:924032007 • Aug 15, 2023

Ok, it still looks like a Minecraft clone. Trust the process.

Download Here


​No more is the entire world a big 100x100x100 cube! Instead, I've implemented some basic worldgen using perlin noise. This sounds like it should be simple enough, and to be fair it almost was. However, you always end up encountering just one more thing that makes it that little bit harder to make it work. In this instance, I wanted to ensure that my world generation system was as robust as possible, to do this, I built it around what I call 'chunk preprocessors.' Preprocessors are simply a special class which contains a method invoked before a chunk is built. In this case, it's responsible for generating the terrain for that chunk if it hasn't been already. Chunk preprocessors are ran by the chunk generation thread, not on the main thread, allowing them to be relatively performant. However, if you are loading a lot of chunks you will see some slow-down. Being able to generate large worlds rapidly wasn't really a priority for me, since in-game you'll only be playing on fixed-size maps, however I still wanted to make the system as robust as possible.




Another thing I added is more dynamic blocks. Now, instead of block data just holding a name and texture, blocks can also have their own 'Process' methods. A block is processed when it is placed and every time any of its neighbouring blocks are modified. To test this, I made a grass block, which uses this process method. When a grass block is processed, it checks if the space above it is free, and if not converts itself into a dirt block, avoiding ugly stacks of grass.

by 183:924032007 06 Nov, 2023
I still love you, itch.io
22 Oct, 2023
Featuring explosives. 
by 183:924032007 19 Oct, 2023
A lot.
by 183:924032007 19 Oct, 2023
I am speed.
by 183:924032007 06 Oct, 2023
Erectin' a dispenser.
by 183:924032007 03 Oct, 2023
Plus, Unity VS My Soul. 
by 183:924032007 26 Aug, 2023
We're gonna need a bi gger CPU.
by 183:924032007 15 Aug, 2023
That's right, I'm making video games.
by 183:924032007 27 Jun, 2023
We've been here before.
by 183:924032007 21 Jan, 2023
Easy to setup, fun to play, tricky to master.
More posts
Share by: