Creating a Procedural City - The Filler
Updated: May 19, 2021
When creating our procedurally generated city, we've split things up into a number of categories and sub-categories. Two of these main categories are the roads (which I've previously discussed) and the filler. The filler is pretty much all of the important content that is placed in the world that occupies the space between the roads. These things could be houses, playgrounds, dumpsters, or anything else you'd find populating a city.
Originally, this filler category was completely randomly generated. Houses were placed in areas that were collision-checked before spawning. Some other items would spawn in the same way randomly, such as trash, by first checking to see if it was in the correct spot (not in a house or on a road) and then spawning. This form of filler generation added more de-facto randomness in the world, as it was nearly entirely procedurally generated. Even the houses themselves were random.
Although this method was more random, it presented a plethora of problems. Houses weren't believable, the environment didn't feel lived in, there were swaths of empty space. Nothing about it felt like a real city at all. So the procedural generation team (Naomi and myself) set to work.
Initially, we knew we wanted to use pre-made segments that would be placed into filler areas. Artists would create sub-blocks that were created from 1000x1000 unit tiles that were linked together. Originally, I was worried that if artists would be able to create these templates in any sort of way they wanted, things would be very complicated. I would essentially have to create a procedurally generated game of Tetris if I wanted this to work.
Naomi then came up with a concept that I like to call the "hamburger" system. We pretty much create linear segments of different sizes that can be stacked on top of each other in different filler spaces. Sets of 3s and 2s would be created the art team (3x1, 3x2, 3x2 or 2x1, 2x2, 2x3). These would then be randomly placed back-to-back in sequence, creating a believable city block structure. Now we have spaces like the one you see below!
- Alexander "Hawkins" Croom