i3azres devlog · #6

Upstairs — walls stack into real second floors, stairs are one drag

2026-12-04 · by Akalonx · i3azres engine team

Devlog #6. In #4 we opened the door and walked into the house. This time we go upstairs: walls can now stack into real second floors, stairs are authored as a single drag — and the NPCs who live there understand vertical space too.

Stacking walls into floors

The first step is structural: in the editor, placing a wall over a wall now stacks floor upon floor instead of refusing or overlapping. The grid gains a third dimension that is logical, not just visual — each floor is a real navigation layer with its own tiles, collision and furniture. The ghost preview shows which floor your drop will adopt before you click, tinted cyan when it differs from the toolbar floor — the author sees where furniture will be born.

A staircase is a drag, not a project

Here is the design decision we're most proud of: an authored staircase is a didactic zone, not a parallel object you synchronize by hand. Dragging a zone of type escada creates the bidirectional pair in the same rectangle — a→b and b→a — and the editor treats both ends as one object: move, resize or delete one, and the other follows. The existing FloorSystem uses per-name hysteresis so you don't ricochet inside the volume: step in, you change floors; you don't bounce back and forth while standing inside the shaft.

Geometry from intent, not fixed assets

The visible stairs are not a mesh. StairRules.Flights deduplicates the pair into a single visual flight and the renderer instantiates escada_interna — a ProcGen recipe dimensioned by the real rectangle: width × length × floor delta. Narrow stairs in a corridor, wide stairs in a hall, same zone type. It's the same DNA as our village generator: the author declares intent, geometry derives from it.

Two conservative rules keep authorship safe. StairRules.EnsurePlatform fills only VOID cells of the target floor under the footprint — existing wall or floor is never scraped; the guarantee prevents arriving into a hole, but it never demolishes construction. And high slabs with no authored tile now get a procedural floor fallback, because before this week a staircase arrival could be playable and invisible at the same time — arguably the worst bug class a level editor can ship.

The vertical is for everyone

A second floor the player can visit but NPCs can't is a stage, not a house. Navigation now understands targetFloor: characters route through stairs as part of normal pathing. The test that made us smile: masons working on a construction site finish their shift upstairs and descend through the stair without pushing through walls — a regression we caught precisely because the AI tried to shortcut the vertical. Habitability is the word we use internally: a floor is done when someone can live in it, not when the player can visit it.

The honest craft lesson

Verticality is where tile engines quietly cheat — most 2D-grid games fake upper floors with teleport pads and separate maps. We almost did. What stopped us: teleport pads make the staircase a lie you can feel — the space above the living room isn't really above it. Keeping floors as stacked logical layers cost us hysteresis bugs, navigation edge cases and one class of invisible-floor bug — and bought a house that is honestly, geometrically, a house. 719 automated tests agree.

What we're still tuning, in the open: the climb itself. Collision on stairs is deliberately tight — the step volume and the wall share centimeters — and the interior camera hasn't fully learned stairwells yet. Walking up works today; walking up smoothly is the polish pass in progress as this post goes out. We'd rather ship an honest staircase with rough edges than a teleport pad that feels perfect.

🌐 https://i3azres.com — try the village playground while you're there. A small Brazilian team's record of building an engine. Follow the project to watch it happen.