### Brush (walls)

### Entities 0/21 · 0/16

Click grid to paint. Select brush above. 32×32

### Preview (focus canvas to drive: WASD or arrows)

### Entities

Spawn points, enemies, and pickups on the map. Hover to highlight on grid.

### Doors 0/24

Place door tiles (4 or 6/7/8). Stand in front of a door and press Use to open it.

### Switches 0/4

Place switch (5) on map. In export you link each switch to a door index or exit.

Switch 0 selected.

### Export

### How to use export

Quick start: Export C → save as `e1m4.h` in `src/vbdoom/assets/doom/` → include in RayCasterData.h → add level case in gameLoop.c `loadLevel()`.

Where to put exported files:

- Map + defines: save as e.g. `src/vbdoom/assets/doom/e1m4.h`
- RayCasterData.h: add `#include "../assets/doom/e1m4.h"`
- Paste `initEnemiesE1M4()` into enemy.c; declare in enemy.h
- Paste `initPickupsE1M4()` into pickup.c; declare in pickup.h

In gameLoop.c loadLevel():

- Add `else if (levelNum == 4) { ... }` for your level
- `copymem((u8*)g_map, (u8*)e1m4_map, cells);` — if map is smaller than MAP_CELLS, zero-fill the rest
- Set fPlayerX, fPlayerY, fPlayerAng from E1M4_SPAWN_X, E1M4_SPAWN_Y and spawn angle
- Call initDoors(), then all registerDoor/registerSwitch from the export comment
- Call initEnemiesE1M4(); initPickupsE1M4();

Also: Ensure door.h has MAX_DOORS and MAX_SWITCHES large enough. Extend level transition checks (e.g. currentLevel < 6) for your max level.

### Load JSON

Paste level JSON below or choose a file.