





🌟 Special thanks to our amazing supporters:
✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Benedikt][David Martínez Martí]
Hello Companions!
Today we'd like to talk a little a bit about the intricate process that is procedural world generation. It is a vast topic, a core feature of the game and something that we're constantly improving and as such we've decided to split this material into few parts. In this devlog we're going to focus on landmass generation.
First, in order to construct our terrain we generate two maps represented as 2D textures that contain information regarding the elevation and moisture of the island where our players (that would be you guys) will play. These textures are created by taking simple noise functions which are subsequently manipulated to fit our needs. The elevation map has more details as we don't want our terrain to be too boring whereas the moisture map provides us with more general areas that affect the environment.
Both maps have the dimensions analogous to the vertices count of the mesh they're describing. The whiter the pixel in the elevation map, the higher the vertex of the mesh becomes. Likewise, blue areas of the moisture map constitute wet areas on the map.
All that information is taken into account when constructing our terrain. Elevation is scaled and modified accordingly to not be too overwhelming considering the camera angle and the zoom of the map that we're targeting in the game. On the other hand, moisture alongside elevation dictates the specific texture and biome of the area. For instance, flat regions just above water with little moisture will produce a desert, whereas regions with the same height but high moisture will yield beautiful meadows.
In order to avoid a situation where the terrain would stick out above water like a sore thumb, we've implemented a gradual yet steep falloff outside the coastline where a plane with a water shader seamlessly blends with the mesh and produces a nice illusion of the water gently lapping the beaches.
Looks pretty cool and it's just the beginning! In the next part of the series we'll cover generating our cities and vegetation to bring some more life onto the playing field.
As always remember to add Glorious Companions to your Steam wishlist and convince your friends to do so too! golem
[ 6080 ]
[ 1481 ]
[ 2067 ]