PCG BUILDINGS
PCG Buildings is a random building generator which uses grammar based procedural content generation(PCG).The buildings generated are based on 3 design patterns, weights and its specified dimensions.
​
This project was done in a team of 3 over a period of 2 weeks and was inspired by a tree generation software named SpeedTree that generated natural foliage in real time for games.

DEVELOPMENT
The buildings are built on a 3D voxel system. Each tile generated along the width and length specified and would be rotated and positioned based on the direction it is facing and the cell it is in.
​
Modifiers for the building:
Weights (Doors, Windows)
Number of levels
Length
Width
Time to generate
Randomize Colours
Design Pattern
​
Each level has its own center, length and width. The level will have its min and max boundaries' position calculated to generate the tiles in the correct position.
​
​
GRAMMAR BASED PCG
To create consistent and believable structures, certain rules needed to be set.
Each subsequent level must NOT be larger than the first level.
All doors not on the first floor MUST have a balcony
Any cell that isn't within the upper level's boundaries will covered with roof tiles.
All levels must be at least 2x2 units
