One of the first big design choices I made was to break away from Prison Architect’s flat map. In PA, everything happens on a single plane: walls, rooms, entities, and jobs all share the same 2D grid. That’s simple, but it means no basements, no bridges, no multi-level facilities.

When I set out to design my own engine, I knew I wanted true multi-floor gameplay. Multi-floor buildings. Underground tunnels. Rooftop yards. A real sense of vertical space.

But the question was: how to represent it? I considered two approaches.

🚫 Option A: Separate map per floor

In this model, each floor would be its own full 2D tile map. The world would nothing more than a stack of the 2D floor maps. Whenever a player would build a new floor, the new floor map would be created and spanned across the entire world.

Straightforward to implement, and therefore such an appealing approach. There is a bunch of map editors available on the internet relying on this structure. For rendering, it would grant a right-away path to display a specific floor — I could just grab some 2D camera code with a little adapting for flooring. And, for a reason or not, it’s indeed the model constantly assumed by ChatGPT when I have long enough conversations with “him” :)

But I disliked and rejected this way.

  • It would be memory-wasteful.

    Imagine a map of 500x500 tiles. Most of it would have only mere ground or one-floor buildings. Some residence buildings for prisoners would probably have underground solitaries, utility rooms, maybe 2 or 3 floors above the ground for efficient housing of all inmates…

    But how much area such residental buildings would take compared to the entire world area? Out of my hundreds of hours of playing in Prison Architect, I can assume ~25%. With actual multi-flooring support, it would be probably much less (because you don’t need to expand your cellblock in 2D dimensions to fit all inmates, you can just build a skyscraper).

    But even with 25% of the world area, 4 floors in total, it would yield us up to maximum ([500 * 500 * 1] + [500 * 500 * 3 * .25] = ) 438K tiles are actually used out of (500 * 500 * 4 = ) 1M tiles of the total world space. At least 56% of the allocated memory would be simply wasted and never used. Assuming each tile would occupy five 64-bit references to definitions of a floor tile and its surrounding four walls or doors, this gives us approximately 20 MiB of RAM of no use. Add some tile-specific parameters like flooded with water, damaged by fire, — and the figure skyrockets up to 50-100 MiB with ease.

    Of course, having overcommitted as much as 100 MiB of RAM sounds like a ridiculous problem nowadays. But from the engineering perspective, I’m simply disgusted with it.

  • It’s unnatural representation of the real world.

✅ Option B: Tile stacks

Instead of duplicating whole maps, the world remains a single 2D grid. But instead of tiles, each grid cell is a tile stack, which can hold an arbitrary number of floors — above ground and underground.

  • Pros:
    • Much more memory-efficient — empty space costs nothing. Players can define floors freely, mixing underground and overground levels without reserving memory for unused space.
    • Floors feel like a natural extension of a tile, not a whole new world. Cross-floor structures become local to a single stack, so it’s easy to reason about stairs, supports, or vertical shafts.
  • Cons:
    • No more internet-grabbed code for rendering. But I’m happy to build something from scratch. This is the most efficient way to learn something (and honestly, it’s my main driver for this project). And, to be completely honest, I still have ChatGPT and Claude by hand…
    • Debugging becomes harder a bit. But as every newbie game developer, I’m yet shining with hope it’s not something I’d have to dive deep so much :)

It’s more work up front, but the payoff is clear: a scalable, flexible, and efficient foundation that can handle everything from underground tunnels to multi-story towers.

Prison Architect gave us flat prisons that could only spread outward. I want to give you towers, bunkers, and labyrinths. With this system, you’ll be able to build up, down, and across — and players will be able to shape verticality however they want.