unity-procedural-cities

Some naive experiments with procedural city generation in Unity

MIT License

Stars
19

Procedural Cities

A procedural house/city generator as described in the Build a System that Generates Houses & Castles Udemy course. This project also uses assets from the Low Poly Nature Pack.

So far, the following is implemented:

  • 3D grid sampling for starting positions,
  • Disconnected component suppression to encourage "bigger" houses
  • Randomized prefabs instantiation for
    • Regular walls,
    • Walls with doors on the ground floor, and
    • Rooftops,
    • Windows with balconies and flowers,
    • Outdoor items (rocks, trees, flower patches),
  • Shared wall removal.

Smaller villages at a 25% chance of clustering horizontally and a 25% chance of clustering vertically:

Larger clusters of blocks at a 62% chance of clustering horizontally and a 11% chance of clustering vertically:

A view from the inside: