This was the Honours Project for my degree in Games Development at Edinburgh Napier University. I studied and classified the different procedural content generation (PCG) techniques and used them to create cities similar to the ones drawn by Minna O.:
The following are screenshots of the generated artefacts (in the app they would be 3D and interactive). I was extremely lucky to have Minna helping me throughout the project — she made all the assets I needed!
And a 2D one (with an orthographic projection):
Needless to say, the final result is way more limited than initially imagined, but I'm extremely happy with what I've learnt. Procedural art is really fascinating!
If you'd like to learn more about how I did it, keep reading!
PCG techniques can be divided in two categories:
For this project I ended up using only additive techniques. Here's a short summary of the most used additive PCG algorithms:
For each category I identified its strengths and weaknesses, and then picked the ones that better suited what I wanted to achieve.
A city is made of stacked 2D layers. Each layer is essentially a list where the items are building, tree, brigde, empty space, etc., and this list is populated using a Markov chain, which is a distribution technique. The idea of a Markov chain is simple: the probability to pick a certain item depends on the preceding item.
Of that list, the building is a special element. It's a stack of blocks generated by an L-system.
Finally, you can change the overall generation rules of a city, e.g. the amount of vegetation, by a set of parameter that amend the values of the Markov chain or of the L-system.