City Districts and More: Update 0.2.1


Isometric Map Generator was updated to version 0.2.1. The main additions are city districts, bigger cities, and building variety. The added buildings consist of variations of existing buildings and completely new buildings (mainly the industrial buildings).


City Districts

Until now the type of a building was randomly chosen while growing a city. This was the worst part of the map generator and thus the main feature of this update addresses this by placing buildings in districts. The district types are suburb, downtown, commerce, and industry. The main algorithm for growing cities is not affected by the changes (and will be detailed in a future dev log). The placement of districts is done in an additional step afterward.

It consists of these four steps:

  1. Decide how many districts per type and in total should be placed.
  2. For each district: Randomly choose a center point in the city.
  3. For each district: Flood fill the city from its center. For each tile of the city save the nearest district center.
  4. For each tile of the city: Choose a random building of the type of the nearest district center.

At the moment the total number of districts placed is simply decided by the size of the city. How many districts of a type are placed is just a percentage of the total. Therefore, the proportions between district types mostly won't change between cities. This should not be noticeable because the district centers are placed randomly and thus the size of each district will be decided by its distance to the other districts. Additionally, two districts of the same type are not distinguishable when they are placed next to each other.


This approach can be improved in two areas. Firstly, the number of districts could be decided by environmental factors or by randomly chosen characteristics for a city. Secondly, the placement of district centers could be affected by its type. For example, suburbs could be placed more at the outside of a city while it has a downtown center.

You can find the implementation here. Thanks for reading!

Files

isometric-map-generator-0.2.1.zip 5 MB
Dec 12, 2018

Get Isometric Map Generator

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.