Generating terrain for any game can become a long and delicate process which takes up several hours of development time that could be spent somewhere else. Though several tools exist for generating terrain the use of PCG methods such as perlin noise among others can be very unpredictable and because of it unusable in the creative process.
With the use of autonomous agents that can perceive the enviornment around them, this tool provides a flexible way for a designer to create a varied selection of terrains through a selection of parameters. There are five main agents implemented: Coast, Smoothing, Mountain, Hill and River agents. The project is closely related to the work by Doran and Parberry's terrain agents with a different implementation.
The tool is made within Unity but the terrains could be exported as a height map for another project.
If no coast is needed, the flexibility of the aproach allows the agents to work together to shape the flat terrain into mountains and hills.
Islands can vary in size and shape while avoiding the coast. The mountain agents make sure that they don't traverse the coast out into what could be an ocean.
Both islands were generated using the same parameters but result in very different looks. Different features were added after such as Hills to the right hand island and a few rivers. The left island has one river going through it from the right.
Features of the Mountain Agent
By changing the parameters one can end up with quite interesting results to produce rock formations, mountain chains or rocky shores close to the coast. The agent has the option to produce a single chain or scattered mountains across the entire area above the water level.
Features of the Hill Agent
The Hill agent uses trigonometric waves to change the evelation and construct smooth hills across an area. One is able to use multiple waves to produce unique results and limit the depth of the hill valleys.
Features of the River Agent
The rivers support both flat and terrain with a bit of noise added to the area. The agent pave their way though cosntrcuting a path away from the coast towards a goal point. The goal is determined using a modified version of the centre of mass formula for the elevation on the terrain chunk instead of the mass.
Link to repository on GitHub: github.com/MarcusS64/PCG-Terrain-Agents