Unity Procedural Terrain Generator



For an assignment in my graduate AI for Gameplay class, I developed a procedural terrain generator, which generates terrain dynamically on startup and where you are going as you move around. As the player, you are able to explore this terrain. Since terrain is generated dynamically as you move around, this gives the illusion of “infinite” terrain. The program uses Perlin Noise and the Diamond-Square algorithm to generate its terrain. The program initially generates terrain in a 3×3 square of chunks, and places the player on the center chunk. As the player moves, chunks farthest away from the player get erased, and terrain that needs to be generated is placed where the player is going. The trees and rock formations were made using Unity Tree Creator.
As for the 2 biomes, the terrain is generated in a similar manner for both biomes, with the only change being the terrain textures and smoothness of the terrain. This terrain generator was made using Unity. I was responsible for creating everything in this project, outside of the textures and the starting code given to us by our professor, which included sample terrain generation and an implementation of Perlin noise.

Click here to try out my terrain generator.
Keep in mind, the project hasn’t been optimized for real-time generation, and so the program may lag when generating new terrain.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s