How does the map generator work?


A few people were interested in learning how the map generates in CopperCraft, so here's a stage-by-stage explanation!

The way that the levels generate in the game is pretty straight forward, first a random seeded noise map is generated and applied as the height map to the terrain:

Then it goes through a stage called "Smoothing", which will average out each cell's height in comparison to it's neighbors. This process needs to be applied multiple times, the more times it performs the flatter the land will be. The game will decide the smoothing amount between 4 - 8 based on the seed to give more variety to the generated chunks, so sometimes it'd be steeper and other times it'd be flatter:

Then the caves generate by creating connected air holes inside of the chunk:

The ores, blocks and ore veins generate and populate the chunk:


And lastly the trees, cacti, mobs, etc. generate:

Get Coppercraft

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Looks great!