One of the more subtle design changes in my game compared to Prison Architect is where walls live.
In Prison Architect, a wall occupies an entire tile.
In my engine, walls live between tiles — exactly where you’d expect them in real architectural terms.
This may seem like a small shift, but it unlocks a lot.
The Problem with Tile-Occupying Walls
In PA, walls are just tile entities. When you place a wall, it takes over the tile.
So when modders try to add things like:
- Fences that should partially block movement
- Windows that should let light/vision through but still divide rooms
- Grates or bars that allow airflow but block escape
- Custom doors or trapdoors between tiles
…they’re forced to place them as if they were whole tiles.
But that causes weird behavior:
- These objects overwrite the tile floor — you can’t have both a floor and a fence on the same tile
- Remember that even the unmodded PA offers several types of Fence — differing each from another only by the flooring underneath
- Vision/pathing logic becomes fragile — a window that’s a tile has to fake being “half solid, half open”
- You can’t define “this tile is accessible from the west, but not from the east” — because the tile doesn’t know anything about its edges
So modders often need to:
- Use ugly hacks like
InvisibleFloorTile + WallEntityOnTop - Modify core Lua logic to manually patch line-of-sight or access rules
- Accept inconsistent behavior between tile types
My Approach: Walls Exist Between Tiles
Instead of being placed on a tile, a wall is placed:
- Between two horizontally adjacent tiles (i.e., North–South wall)
- Or between two vertically adjacent tiles (East–West wall)
So the map structure looks like this:
- Tiles hold floors, items, and entities
- The walls go on the edges, not inside the boxes
Benefits of Edge-Based Walls
- Rooms remain intact — No more walls “eating” tile space. You can have a 5x5 room that’s actually 5x5.
- Precision for modders — You can define visibility, access, and adjacency cleanly, without hacks or ambiguity.
- Natural doors & windows — These too live on edges — a door is a horizontal or vertical opening, not a strange tile overlay.
- Better LOS and AI — Walls block line-of-sight and pathfinding based on real adjacency, not “missing tile” logic.
And yes, the tile structure is more complex — but that complexity lives inside the engine, not in mods. Modders will just say something like:
"WallType": "Brick",
"Edge": "North",
…and the engine will handle the rest.
Conclusion
This one decision — putting walls between tiles instead of inside them — makes everything cleaner, from floor plans to furniture placement to simulation logic.
I bet it’s one of those foundational choices that quietly pays off in every corner of the design.