Terrain crafting

Screen Shot 2013-03-10 at 2.10.12 PM

I’ve been working on MMORPG Tycoon 2’s procedural terrain generation, today.

Issues fixed today:

  • Beaches are wider.
  • Beaches are no longer jagged when not oriented precisely north/south or east/west.  (Related to this, lake borders are no longer blocky).  They also are no longer precise straight lines along the region boundary — the beach actually occurs about a hundred meters inside the region boundaries.
  • When mountain borders extend out into the water, they no longer extend grass through the ‘beach’ zone bordering the water.
  • When mountain borders extend out into the water, they no longer have a “wedge” cut into them (pictured in this screenshot).  The mountain border now ends more naturally.  Or at least, as natural as you can get when you’re talking about something which intended to appear as a blatantly artificial mountain border.  :)
  • Beaches now smoothly rise from the water, instead of “stepping up” by a meter or so from the water level.
  • Removed three ‘if’ statements from the edit-mode camera code, resulting in a much smoother camera motion while zooming in and out.

Useful tip for anyone writing camera code:  Removing ‘if’ statements (or other forms of conditionals where sometimes the camera will do one thing, and other times the camera will do something else) will almost always improve the overall camera behaviour, from a user’s perspective.