Apr 14, 2015

Progress Update April 2015

This morning I fired up Mercurial and noted that my last check-in was 6 weeks ago. I'm kind of surprised, I expected it to be much longer. The last couple of months has seen my day job almost completely take over my life. Working on the weekends and out of hours meant there's been little time to even say "hi" to my family, let alone work on this side project. Fortunately, the crunch is now over, and I can go back to a more manageable schedule.

What has happened in the last 5 months? Early on I decided to completely rewrite my terrain generator to incorporate a long list of improvements, as well as finally get around to producing correct biomes.  The main project is currently using my 2nd generation Terrain generator from a few years ago, and this new one will be version 5. What happened to version 3 & 4? They were experiments that failed but ended up teaching me the techniques I've now honed in version 5. The new terrain generator is faster and produces much more interesting terrain than before, but so far I've failed to achieve the full objective of producing biomes.

An example of the terrain I'm currently creating. 

The rainfall map generated for the same terrain.

Part of the reason is due to the intrusion of my day job into my spare time as outlined at the beginning of the post. The second is that I'm in uncharted territory and there has been a great deal of trial and error. One of the key factors involved in biome assignment is rainfall, which is a fairly complex phenomenon. In the real world, it involves temperature, pressure, moisture, wind and is affected by the topography of the land itself.

However, I'm not trying to simulate a full on climate system, so I've taken a bunch of shortcuts. Like others, I've tried to seed the world with moisture, then introduce winds, and let them move the mositure around generating rainfall. Since this is a gross abstraction of what is really happening, the results are quite unpredictable, and its taken alot of tweaking and fine-tuning of the overall algorithm to achieve useful results. That said, its still not right. Some areas are completely bone dry, and others receive the equivalent of an olympic swimming pool of water every hour.

To add to the complexity, I decided to take into account seasons. In the real world, average wind patterns change with the seasons, leading to vastly varying rainfall. I wanted to achieve something akin to realistic conditions on earth. Eg, some places have about the same rainfall all year, others have a distinct wet season where the rains are torrential, whilst others receive very little rainfall all year round.

I said earlier that I failed at my objective to produce biomes. I decided to have a go at the terrain generation rewrite because I'd made good progress in the previous months re: updates and thought I needed to work on something a bit more experimental for a few weeks. That ballooned into several months, and its not even finished yet, so tangible progress on the main project is non-existent, because the new terrain generator isn't finished enough to make use of.

Time to knuckle down and finish.