Isometric Rooms Export
An isometric scene with rooms, straight out of the PixelRoot32 Tilemap Editor: one map per room on a shared tileset, a room graph built from the exported room table, and an arrow key that moves to the room connected on that side.
iso_tilemap_exportconsumes one isometric map.iso_dungeonis the gameplay demo (hero, depth sorting, doors). This one is the smallest consumer of the rooms part of the export, and nothing else.
What the export gives the game
| Symbol | Use |
|---|---|
ISO_PROJECTION | The scene's cell-to-screen basis. |
ISO_ROOMS_MAP_ROOMS[] | Each room's origin cell, size and connections. |
ISO_ROOMS_MAP_ROOM_LAYER | That table with the cell stride (32x16). |
ROOM_LAYERS[], NUM_ROOM_LAYERS | One TileMap4bpp per room, local cells from (0, 0). |
init() | Fills the maps and, with Install palette, installs the palette. |
IsoRoomsScene builds the graph with the projected gameplay::buildRoomGraph(layer, graph, ISO_PROJECTION, perRoom), widening each room by what its own map draws (expandProjectedMapBounds), and draws the current room through gameplay::roomProjection(ISO_PROJECTION, room).
Producing the export
src/assets/tilemap/ is the editor's export of editor/iso_rooms.pr32scene.bin: an isometric 14x7 scene with two 7x7 rooms (Right goes 0 -> 1, Left comes back) on one tile layer, using the tilesets in editor/assets/tilesets/ (32x16 floors, 32x40 walls). To re-export it:
- Open
editor/iso_rooms.pr32scene.binin the Tool Suite. - Edit the rooms or the tiles. Keep one tile layer: this example draws the first layer of each room.
- Export (the bit depth follows the colours in use; these tilesets give 4bpp) with:
- namespace
iso_rooms::map(this names the filesiso_rooms_map.h/.cppand the room symbolsISO_ROOMS_MAP_*); - Install palette:
Background; - output folder
src/assets/tilemap/.
- namespace
Build and run
pio run -e native -t execThe arrow keys move between connected rooms. Each room should look exactly as it does in the editor: same colours, walls standing on their cells, nothing cut at the top of the tall tiles.
Requires PixelRoot32-Game-Engine 1.15.0 or later, the first release with the projected buildRoomGraph overload and roomProjection().
Source code: https://github.com/PixelRoot32-Game-Engine/PixelRoot32-Demo-Projects/tree/main/graphics/iso_rooms_export
