#include <williamwhitehouse.dev>

Procedural City Generation
For the "Advanced Technologies" module at university, I was tasked with creating a procedural city generator in the Unity game engine. In this short-term project, I implemented Model Synthesis and the Wave Function Collapse (WFC) algorithms to allow large scale cities to be generated from small artist-defined tiles at the click of a button!
Alongside the completed project, a report detailing research, processes and analysis was made. You can read the report for a more in-depth dive into this project!
Proc City Gen Proc City Gen
Proc City Gen Proc City Gen Proc City Gen
Proc City Gen Proc City Gen Proc City Gen
Development
The generated cities have a fully connected road network with traffic lights and pedestrian crossings. The city is split into parks, industrial, residential, commercial and highrise districts.
Districts are generated using the flood fill algorithm with each district having their own predefined spawning chance and sizes. They also determine which props can spawn (which use Poisson Sphere Distributions and blue noise to generate placement) and what rules the WFC algorithm follows for building generation.
Proc City Gen Proc City Gen

The city is generated from small predefined tiles, that use anchor points to generate valid neighbour relationships, which allow tiles to be iteratively placed using the WFC algorithm. Tiles have a custom inspector to make it easy to edit their anchor values, as well as custom "position handles" to move the anchors in the scene view. Tile Set Scriptable Objects manage multiple tiles and the generation of valid neighbour relationships as well as the individual tile generation probabilities during the WFC process.
Proc City Gen Proc City Gen
Proc City Gen