Skip to content

Simple City Generator: Quick Start

Samuel Knox edited this page Jan 28, 2021 · 6 revisions

Getting Started

If you haven't already, follow the instructions to install Unity. Afterward, open a Unity Project and import the Simple City Generator Package:

  1. To generate a city, drag the prefab into the hierarchy
drawing
  1. The variables for the city generator are shown in the editor. These variables correspond to the architecture of the city
drawing

The variables are defined as follows:

  • City Size - This is the length and width of the base in which the city covers.

  • Building Coverage Index (BCI) - Defined by the area of the ground floor of the building divided by the available 'cell' area of the building.

  • Floor Area Index (FAI) - Defined by the area of all the floors of the building divided by the available 'cell' area of the building.

  • HVariability - Is the variability in the height of each building defined by a normal distribution. This value is used as the sigma value in the normal distribution.

  • ARVariabilit - Is the variability in the aspect ratio of the building from a birds-eye view.

  • Mean Cell Size - Is the available area for each building. All buildings are arranged in a square grid structure*

*As it is not possible to prescribe both a City Size and Cell Size, the Mean Cell Size is an estimate to ensure an integer number of cells.

The principal variables, BCI and FAI, are further described in this image:

drawing

Further to the variables, there is:

  • Use Sim Manager - This is for advanced users are requires several more scripts to be added and customized for purpose. The purpose is to allow an external script to edit the variables within the generator and re-spawn the city at the end of a simulation.

  • Spawn Distributions - Spawns four distribution center prefabs in the corners of the city. These prefabs can include spawners of their own that spawn drones during a run.

  • Building Prefab - This is the building that will be used to generate the city. This building will be scaled and hence should be at a scale of (1,1,1) when added. This can be seen in the prefab which is already included in the Simple City Generator.

  • Distribution Prefab - This is the distribution center prefab. The included prefab has a base building and a spawner above that spawns drones during a run.