A simple city generator that uses the Wave Function Collapse algorithm to generate both the road network and the buildings.
Wave Function Collapse is an algorithm that can procedurally generate images, text, audio and almost anything that follows a pattern of a simple set of initial parameters and a set of rules, this is why I chose it to generate a cityscape; a well planned city has a lot of patterns and design rules.
The algorithm does all the above without any artificial intelligence shenanigans. The output of Wave Function Collapse is a random showcase of the emergent behaviour/rules built based on the requirements of the task.
This version generates a small slice of a city, defining 4 different kind of district types: residential, commercial, industrial and park.
The generated city then can be exported in an FBX format to then be used in another project, or in any 3D modelling packages, like Maya or Blender. The exporter uses ASCII, which may need to be converted to binary, before it can be imported into some applications (e.g. Blender).
Link to the GitHub repository.
Copyright © 2022 Norbert Kupeczki - Game Developer Portfolio
All Rights Reserved.