Skip to content
StumpFox Games
Developer blog1 min read

A new city every run

How City Escape builds a fresh city for every run, and why ten thousand of them are checked before you play one.

By StumpFox Games TeamCity Escape →

Every City Escape run happens in a city nobody has seen before. The streets, parks, lakes and blocks of buildings are all generated from a seed when the run begins.

How a city is built

  • You start on the ring road one cell in from one corner, and the flag sits one cell in from the opposite corner.
  • Blocks become rows of buildings, parks or lakes, and every lake keeps a grass shore.
  • Trees fill part of every park and some of the grass between buildings, so cover is spread across the city.
  • Police start at least twelve cells from you, on streets connected to the ring road.

Checked before you play

A generated city has to be fair as well as new. Our tests generate ten thousand seeds and validate every one, and every campaign level's fixed city is checked for being valid, with room for its police.

Within each district the cities grow as you progress, from 32 by 24 cells with 4 officers up to 64 by 40 with 55.

City Escape's key art. Everything in the game is drawn in code; there are no image files.
City Escape's key art. Everything in the game is drawn in code; there are no image files.

Even the look comes from the seed. Decorations are chosen from a hash of the map's seed, so a city always looks the same when you play it again.

A city nobody has seen before, every time.

Questions about this post? Write to [email protected].

← All news