Tutorial: Modifying a Level
Edit a mobile-eggbert .txt level file and see changes in-game.
Level File Location
Level files are in Content/Data/Level/.
Each world has a scene0N.txt file (where N = 1–5).
These are plain UTF-8 text files.
Understanding the Format
Full format reference: Levels. Quick summary:
[Header]
blupiPos=50 50 (Blupi spawn column / row in the 2D tile grid)
region=2 (sky/background palette index 0–3)
[Decor] (100×100 tile grid, row-major)
0 0 0 0 10 10 10 ... (tile IDs, space-separated, 100 per row × 100 rows)
[MoveObject]
numObject=7 (ObjectType::ExitDoor)
posStart=50.0 1.0 50.0
posEnd=50.0 1.0 50.0
speed=0.0
Step 1 — Locate a Level File
ls Content/Data/Level/
# scene01.txt scene02.txt scene03.txt scene04.txt scene05.txt
Step 2 — Change the Spawn Point
Open scene01.txt and change blupiPos to a different column/row:
[Header]
blupiPos=60 40
Step 3 — Add a Block
In the [Decor] section, tile IDs map to BlockTypes constants:
| ID | Block |
|---|---|
| 0 | Air (empty) |
| 10 | Ground |
| 68 | Lava |
| 183 | Wall |
| 200 | Platform |
Change a 0 at the target position to 10 to add a ground block.
Tile coordinates: row index = Z axis, column = X axis, starting from top-left.
Step 4 — Add a Moving Object
Append a MoveObject block at the end of the file:
[MoveObject]
numObject=25 (shield power-up, ObjectType25)
posStart=55.0 1.0 55.0
posEnd=55.0 1.0 55.0
speed=0.0
Step 5 — Reload In-Game
Galaxy Eggbert loads level files at game start. Restart the binary to see changes:
cd cmake-build-debug/bin && ./GalaxyEggbert
There is currently no hot-reload feature; a restart is required.
Coordinate System
The .txt tile grid (100×100, XZ plane) is loaded into the 3D world at Y=0.
Each tile maps to one world block. Blupi spawn (col, row) in the file
maps to (col + kWCX, 1, row + kWCZ) in world coordinates (kWCX = kWCZ = 50).
Needs verification — exact offset mapping.