Land Generation Engine – Update

Trade-offs and compromises are a necessary “evil” when it comes to software development. If you want feature A, you must sacrifice some speed. If you want feature B, you must reduce what’s going on with feature C. Procedural land generation is supposedly no different and that has been my ongoing battle for the past six months or more.

There are tried and true methods of creating a polygon land dynamically which are extremely fast, but using these methods you give up a lot of control over how the land is formed. You must also sacrifice a few “cool” features whenever you create polygon lands, such as vertical wall faces and overhangs as well as seamless underground passageways. Voxel land formation (think Minecraft) allows for these features, but in using voxel land generation you typically sacrifice speed and the beauty of polygon mesh rendering.

I absolutely do not want to make compromises when it comes to the Omega Connection land generation engine. I want it all: speed, control over how the land is formed, underground caverns that do not require separately loaded maps when a player enters that area, realistic formation of streams, rivers, lakes and seas, and even vertical cliff faces. And it all must be done while the game is being played, not just on startup. I am apparently a glutton for punishment.

I have gone through over thirty iterations of the land generation engine, including around ten complete rewrites, in an attempt to have it all. Each attempt provided insight into what might work and what would not. Each attempt showed compromises that I was unwilling to make, but each attempt brought the land engine a little closer to what I believe it needs to be. The current version of the land generation engine is codenamed ProcGen32 (there were a few iterations entitled LandGen or VoxelGen in there as well) and as of this writing I am incredibly happy with the results.

The engine creates a brand new 2km X 2km map based around how you, the player, have been playing the game complete with shear walls and overhangs. It generates waterbodies and rivers in a very natural method (rainfall, land type and erosion), both above and below ground. It generates, on average, approximately 30km of underground passageways, tunnels and caves. And it does it all in about five seconds. Compromise can kiss my yoga-doing butt.

There are a few additional features that must be finished up in the land procgen engine, which will tack on a second or two, but as the in-game action of unlocking a new land takes approximately 30 seconds time I should finish well within my speed constraints. Once those are finished, I promise to put up a few videos of the lands this amazing engine is creating. In the meantime, I have managed to output a few 2D image maps of the land and underground caves, as well as vertical and horizontal slice throughs as animated gifs.

Surface Map

Procedurally generated surface map of land types

Underground Cave Map

Underground caverns generated for map

Surface Water Map

Surface water bodies for map

Vertical Slices

Vertical layer by layer slice of the map

Horizontal slice through

Horizontal layer by layer slice of the map

Leave a Reply

Your email address will not be published. Required fields are marked *