alt text

alt text

One of my oldest passions in programming is procedural content generation. Of this field, probably my favorite specific area is in generating terrain. There are so many fascinating ways to model (or fake) real world processes to get results that can be used in so many different applications.

This was basically a sandbox for me to play around with ideas that I’d been exploring and reading about for years. I built it in Python, with the intent for it to be very rapid to iterate in, even on a slow computer - this was important because I was doing a lot of my work on an old laptop during my commute. I ended up with a heightmap generator that applied Perlin noise perturbations to Voronoi diagrams, optimized for islands. The algorithm used image processing techniques such as Sobel filters for beach edge detection.

This was built with NumPy and SciPy, to speed up full map operations and to make certain algorithms quicker to implement compared to raw Python lists. Because, even with the improved vector processing this granted, regenerating a full map was still slow, I set up a system for dynamically caching and reloading individual steps of the process where the application would compare its own source code against a saved copy to determine whether changes had been made that necessitated regeneration of a step.

alt text

alt text

alt text