Urban Renewal Kit

Over the years I’ve become interested in procedurally-generated content. On the gameplay side, it provides a tremendous amount of replayability. On the production side, the bang-for-the-buck value is phenomenal.  I thought I’d take a moment and talk about how levels were created in Atom Zombie Smasher.

Street work

The level first starts off as a blank slate:

At this point, it’s just a big empty plot of dirt. I find a random spot and lay down a street:

Then, I start laying down the major “avenue” streets.  These streets are laid down in a such fashion to guarantee very large city blocks:

The major city blocks are now defined. I now divide these giant blocks into smaller pieces.  One-by-one, every city block is measured; if it exceeds a certain threshold size, I divide it with a street.

With that, the streets are all done!


Now that the roads are completed, the level is ready to be filled with buildings. The building population system is fashioned after how you pack furniture: first you pack all the big items (the sofa), then you take care of the small stuff (the sofa cushions). In this case, I first start with the large skyscrapers:

Notice the little empty plots of land neighboring the buildings. Tiny one-story buildings are now crammed into these these spots:

Finally, some of the buildings are replaced with stunningly beautiful city parks:

Done!  People are then distributed throughout the streets, ready to be either rescued or eaten alive.

Et al

This is an extremely straight-forward way of creating a city - there aren’t really any surprises in how it works. It’s based on a grid, making it very easy to check for intersections, overlaps, building sizes, and such. It’s fairly fast; the load time is hidden when the map zooms down from the world map to the city map.

If I was to return to this, I’d integrate more gameplay rules into the city generation. For example,  creating “districts” (residential, industrial) characterized with certain buildings, building behaviors, population types.

Furthermore, something I’d like to try to tackle is non-perpendicular streets and buildings.  This would allow for things like curved roads, round-abouts, etc., and introduces more variability than a straight grid provides.

At any rate, give procedural content generation a try.  I specifically love how such content gives every player their own one-of-a-kind experience, a custom map that only you will ever get to play. This is something very unique to video games. My favorite description of Atom Zombie Smasher is from Tom Chick, who said it “uses tiny dots to create moments of drama.”  I certainly didn’t author any insightful dialogue or thought-provoking art – the game systems organically conjure moments where civilians are put in back-against-the-wall situations.

Some wonderful games that focus on procedural content - Darwinia, Dungeon Crawl Stone Soup, Minecraft, and my beloved X-com.  I will never forget my best sniper in X-com, Abraham Lincoln.  You had a clean shot across the map, and you nailed it like the best damn 16th president of the US of A.

If you haven’t played these games, then do so!