Generating city maps - CityGenerator/Megacosm-Generator GitHub Wiki

The scope of this discussion is to define what information is needed to create a city, what can be extrapolated, and in which order elements should be created.

Available Data

The following data is available to the map generation:

  • Population
  • Size Category
  • Population Density
  • area (population/density)
  • special locations
  • business list
  • number of main roads

Order of Creation

The following city details, from most important to least important:

  • Terrain
  • Primary Roads
  • Secondary Roads
  • Buildings

Terrain

Terrain determines grade and slope, which in turn determine road paths.

Primary Roads

Primary roads provide the arteries of travel between cities. They often lead to markets or pass straight through uninterrupted. Where the roads meet are important points within the city, and buildings will grow outward from those points. Reference: http://www.redblobgames.com/pathfinding/a-star/introduction.html

Secondary Roads

Secondary roads interconnect important locations within the city and provide locations for new buildings TODO: Figure out a sane way to generate these

Tertiary Roads

Tertiary roads are simple access roads through places lacking secondary roads, often dead-ending. TODO: Figure out a sane way to generate these.

Next Steps

  1. Generate Terrain
  2. code cleanup
  3. spike object-based grid
  4. Primary Road Generation