Procedurally Generated Content: Week 2

posted in: Blog, Procedural Generation | 0

This week I refined my coastline generator to create something that more closely resembles an island.  The script is still buggy, but it has improved significantly from last week’s work.

Agents now work independently – moving along lines in a random direction until all assigned tokens (vertices to modify) are spent.  At each vertex, a random repulsion and attraction point is created.  These points – as well as the distance to the edge of the map – are used to determine which point adjacent to the vertex will be raised.  When a point is moved, the agent moves to that location and continues on.

The current script creates a wedge shape in the -1,-1 direction away from the center of the grid.  Every landmass created is locked in this quadrant.  This is a bug I still have to work out – The shape of the continent suggests that the sides of the quadrant are repulsing vertices.  Continents will look much better once this is fixed.

I also added water to more clearly define continents.

The source code for this project can be found on my GitHub profile.

Overview of generated continent, clearly forming a wedge pointing towards the center of the map.
Zoomed-in view of improved continent, with algorithm refinements and water.


Leave a Reply