Warman's world is not one continuous level. It's a collection of rooms, each with its own terrain, enemies, interactables, and navigation grid. Rooms connect to each other through portals. When you walk into a portal, the game transitions you to the target room and the new room's terrain, pathfinding, and entities spin up.
Room Files
Each room is defined by a RoomFile, a binary data structure containing the terrain point grid, doodad placements, and room metadata like width, height, and edge heights. Edge heights matter because rooms can connect at different cliff levels. A room's north edge might be at height 2, meaning any room connecting on that side needs a matching edge height, or a ramp, or a cliff face to handle the transition.
The WarmanRoom class wraps a RoomFile and creates the TerrainCell grid from it. Cells are linked to their neighbours (top, right, bottom, left) so cliff detection and texture transitions can work. This cell grid is what the terrain renderer and pathfinding system both consume.
Maps as Collections of Rooms
A map (GameBase) is a collection of rooms organised into a spatial layout. The map file defines which rooms exist, where they sit relative to each other, and which portals connect them. When a player enters a new room, the map tells the game which RoomFile to load and where to place the room's GameObject in world space.
Each room tracks a lot of runtime state: every unit, enemy, projectile, interactable, trap, ground effect, and decal active in the room. Per-room bookkeeping matters for performance. When a player is in Room A, the game doesn't need to tick enemies in Room B. The simulation only runs full updates for rooms that contain at least one player.
On-Demand Loading
Rooms load on first entry, not all at once. When the game starts, only the initial room generates. When a player steps through a portal to a new room, that room's terrain generates, its pathfinding grid builds, its enemies spawn, and its interactables initialise. This makes the initial loading screen near-instant regardless of map size. A scenario with 50 rooms loads just as fast as one with 3, because you only pay for the first room upfront.
Portals
Portals are the glue. They're a type of interactable that, when triggered, transitions the player to a target room at a target position. The portal system handles both same-map transitions (moving between rooms within a single map) and cross-map transitions (traveling to a different map entirely, like going from the overworld to a dungeon). The portal configurator in the level editor lets designers wire up portal connections visually.
From a networking perspective, room transitions are just another UI command. The player's input sends "open portal" to the simulation, the simulation moves the player to the target room, and every client processes this identically because it's part of the lockstep tick.
Scenarios
Any part of the game that works in the base scenario also works in a custom one. Multiplayer, save files, the world map UI, and portals. Custom scenarios don't need to reimplement anything; they just provide different room files, doodad configurations, and script hooks.