2010
01.28

Biomes balancing and rivers

I’ve replaced the simple sinus function for latitude temperature with a bit more complex one :

sqrt(0.5*(1+sin(x-1.6)^5))

Go there and copy/paste the function to see it. Put 0 and 6.28 in the x min and max.

The result is that there is more temperate climate, tundra and desert bands are thiner as seen on this biome map.

I think it’s better for the gameplay. We have a bit of tundra, a bit of desert, some tropical zones, but the main part of the land is Tolkienish temperate climate.

I spent also a good amount of time breaking my teeth against river algorithms… I tried slope based simulation, A* and dijkstra path finding using slope or altitude as movement cost and finally rapidly-exploring random trees. None of them gave a good result… I’ll probably fall back to a more pragmatic, less simulationistic solution…

3 comments so far

Add Your Comment
  1. Have you seen James McNeil’s posts on using RRTs for river network creation in games? They probably won’t be of direct assistance – the river network is built prior to creating a height map – but the screenshots sure are pretty.
    http://playtechs.blogspot.com/2008/11/rapidly-exploring-random-trees.html
    http://playtechs.blogspot.com/2008/11/rrt-with-obstacles.html

  2. Have you tried identifying drainage basins? Real rivers tend to stick near the center of their basins, sure (with tributaries coming down smaller indentations that you might call sub-basins), but meander and lay down silt. A river’s volume will always be the rainfall in its basin minus evaporation there, and its path within the basin will be more random than efficient.

  3. Yeah I discovered RRT thanks to James’ post 🙂
    As for drainage basins, I think any heightmap based method will fail because of the coarse resolution of the heightmap (compared to the river). I’d need a lower resolution heightmap but I don’t want to because I want the map generation to be as fast as possible (it takes currently less than 1 sec). That’s why I also avoid pure simulation technics and rather use hacks to reach something realistic enough 🙂