Generating Exhumed River Channel

Generating Exhumed River Channel

I recently did some work in generating rivers in a 2d game. Revisiting this work to create an exhumed river channel, I decided it might be fun to revisit how to generate it to make the channel look more realistic. Instead of using a drunken walker, this is a more expensive but interesting map generator:

  • Start by generating 2d simplex noise where
    • less <0.6 is floor
    • rest is walls
  • Generate terminal lines at each map exit (north, south, east, west). Shuffle those lines and randomly choose a start and end location for the river based on two of

Read More

Generating 2d Rivers

Generating 2d Rivers

Rivers are really hard to generate for 2d top-down games for multiple reasons:

  • Rivers primarily form based on heightmaps which are hard to display in top-down
  • Displaying fluidity when working with sectors or grid-based rendering can be complicated, bresenham's line algorithm only goes so far to make things look smooth
  • naturally occurring mechanisms of nature have numerous factors in play that caused them to exist. Simulating all of these factors isn't reasonable.

I was able to make relatively decent 2d rivers using a few techniques.

  1. Started by having terminal points where rivers can start/stop. Primary start positions might be

Read More