Source code for the interactive procedural city generation algorithm described here, ported to Godot 3 using GDScript.
Exported to HTML5 at https://t-mw.github.io/citygen-godot/.
- Drag to pan
- Scroll to zoom
Mainnode coordinates the other classes and does some simple drawing.CityGennode contains the city generation algorithm. The size of the city can be customized using thesegment_count_limitin the inspector for the node.PopulationHeatmapnode generates the population heatmap that influences the density of the generated city. The noise used for the heatmap can be customized in the inspector for the node.
city_gen.gd can be easily copied out for use in other projects, since its only dependency is the PopulationHeatmap node.
