This project is a procedural city generator build in Unity using a tile-based constraint system. I plan to use this work for future projects ex: games, videos, and simulations. Each tile defines edge types and the generator fills a grid by selecting tiles that match neighbor edge's. The system uses recursive backtracking to ensure a valid layout.
- Procedural city generation
- Configurable generation settings
- Unity
- C#
- Blender
- Tile-Edge constraints determine how it can connect to neighboring tiles. Tile rotations are automatically supported, increasing layout variety without requiring additional assets. (Current building + road assets Developed/Baked in Blender)
-
-
-
- Generator uses recursive backtracking with weighted tile selection to build valid road networks, building blocks, and open spaces while respecting border and connectivity rules.
-
- Changed generation system to use a district-based road layout system. Cretes varies urban block structures. First creates network of road bounderies that span between 6-8. The road positions are converted into a grid mask, which determines where roads must exist.
-
- An issue in the beginning was that the roads would spawn within the blocks and generate these strange shapes, so I created a weighting system to make the probability of roads spawning 40x less likely than buildings. This doesn't completely rule out the possibility of having a road spawning in a strange formation, but makes it a little quirk that I want to be very rare, like a shiny pokemon.

- I recently learned about XML documentation and decided to use it for the first time in this project. Good practice to comment code. Deleted unused parameters and old/testing codeblocks.
- Added Building + Empty tile randomization. Each building tile type (1 door, 2 door, 3 door) have 2-3 variations of that building to bring more diversity to the city.
-
- Three empty tile variations to choose from (empty, trees, lake)

- Adding more city customization. Ex: Creating a wall of buildings around the city, or making it surrounded by road.
- Attempt to add features like traffic lights + more