Zone generation

Published October 02, 2018
Advertisement

Subscribe to our subreddit to get all the updates from the team!

I have integrated the zone separation with my implementation of the Marching Cubes algorithm. Now I have been working on zone generation.

A level is separated in the following way :

  1. Shrink the zone map to exactly fit an integer number of Chunk2Ds, which are of 32² m².
  2. For each Chunk2D, analyse all zones inside its boundaries and determine all possible heights for Chunk3Ds, which are of 32³ m³. Imagine this as a three dimensional array as an hash map : we are trying to figure out all keys for Chunk3Ds for a given Chunk2D.
  3. Create and generate a Chunk3D for each height found.
  4. Execute the Marching Cubes algorithm to assemble the geometry for each Chunk3D.

 

In our game, we want levels to look like and feel like a certain world. The first world we are creating is the savanna. Even though each Chunk3D is generated using 3D noise, I made a noise module to map 3D noises into the 2D to able to apply 2D perturbation to the terrain.

image.thumb.png.dabfc74065279611beab5f09c82c5ebd.png

5a8d9e3977e7f_Jdk-9.0.1Screenshot2018_02.21-11_27_44_36.thumb.png.e546c2bba66ca8e483a2406a92f2fee2.png

 

I also tried some funkier procedural noises : 

5a8da258f37cf_Jdk-9.0.1Screenshot2018_02.21-11_44_58_06.thumb.png.e7131ac55bc1980312779cc7b71187aa.png

An arch!

5a8da263044bf_Jdk-9.0.1Screenshot2018_02.21-11_45_15_28.thumb.png.d3baa9a1a385c9229dd1d8ee246f9783.png

5a8da26e86f17_Jdk-9.0.1Screenshot2018_02.21-11_45_20_30.thumb.png.1b2de9b36b1dac32988d481b1199a3d9.png

5a8da2750c771_Jdk-9.0.1Screenshot2018_02.21-11_45_33_61.thumb.png.b6f3a60564e5f2d8a0cf4c4298148537.png

5a8da27b6f980_Jdk-9.0.1Screenshot2018_02.21-11_45_42_05.thumb.png.6b76ffd7a92919eb31abc605e8757e36.png

 

The important thing with procedural generation, it's to have a certain level of control over it. With the new zone division system, I have achieved a minimum on that path for my game.

Previous Entry Zone division
Next Entry Unit Vision
1 likes 1 comments

Comments

jbadams

I don't have much specific to say, but I just wanted to quickly comment that I've been finding these entries interesting, keep up the good work! :)

February 21, 2018 11:30 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement