Skip to content

How does it work

Spiralwise edited this page Apr 28, 2017 · 1 revision

This page describes how the procedural generation works.

The Architect

I really mean the guy who design buildings. A script called Architect takes as input a Blueprint that describes what kind of building is wanted. It creates the actual mesh for the scene. It can draw two primitives : a parallepiped or a trapezoid. These primitives, for a reason, are called stacks. The stacks are assembled in different ways in order to shape the building.

The Blueprint

The role of the blueprint is to provide a mean to create different "architecture style" by district (e.g. wide and flat for industrial zone, tall and narrow for commercial zone). The blueprint is a simple serializable class that contains different design parameters for the architect in order to draw the building. The architect chooses values in the range of the blueprint parameters. These parameters include:

  • The minimum and the maximum height
  • The minimum and the maximum width/depth
  • The number of stack (explained in chapter The Architect)
  • The height growth ratio (the ratio between each stack)
  • The building style

The District Layers and the City Manager

A district is a pack of buildings. A class called DistrictLayer creates the districts and arranges them around the center.

Clone this wiki locally