Levels & Worlds

Two world formats: mobile-eggbert's flat 2D levels, and the genuinely-3D .vwr format.

World Data Model (engine-agnostic, shared by Simple3D and CNA)

PropertyValue
World size100 × 100 × 100 blocks (VoxelConfig::WorldBlocksPerAxis)
Chunk size10 × 10 × 10 blocks (VoxelConfig::ChunkSize)
Chunks per axis10 (VoxelConfig::WorldChunksPerAxis)
Block encoding16-bit: 12-bit type ID (0–4095) + 4-bit metadata (0–15)
World center offsetkWorldCenterX = kWorldCenterZ = 50 — centers the grid on the origin

See World, Chunk, Block, and VoxelConfig for the full API.

Two World File Formats

1. .vwr — Native Binary, Genuinely 3D

A palette-compressed voxel format (magic VWR1, chunk payload magic VCH1). Empty chunks are skipped entirely. This is the only format with real Y variation — it is GalaxyEggbertCNA's default load path (GEWorldRuntime::LoadFromVwrFile). Full spec: VWR Format.

The only .vwr world that exists today is worlds3d/world001.vwr, generated by the GenerateSampleWorld3D CMake tool target: a ground floor, a 10-step ascending staircase, a raised platform, a walled room with a doorway, and two pillars — 2729 non-air blocks, Y range [0, 13].

No automated 2D→3D converter There is deliberately no automated .txt.vwr converter that "promotes" a flat mobile-eggbert level into a 3D one — this was explicitly rejected as a direction. 3D worlds are hand-authored.

2. mobile-eggbert .txt — Flat 2D, Reference/Secondary Path

mobile-eggbert's original plain-text level format: a header (blupiPos=, region=), a 100×100 Decor: tile grid (placed at Y=0 only — this format is inherently flat), a second 100×100 BigDecor: background layer (parsed and stored but not rendered anywhere yet), and MoveObject: entries (object placements, not yet parsed by GEWorldRuntime for CNA).

GEWorldRuntime::LoadFromMobileEggbertFile still exists as a secondary/reference path in CNA (e.g. for later faithful-remake level porting) — it is no longer the default loader, having been superseded by LoadFromVwrFile.

Block Types

A block's type ID is an icon index into object-m.png (441 addressable tile IDs, 64×64 px each, 20 columns, 65 px pitch including a 1 px gap). BlockTypes::fromMobileIconId() converts a mobile-eggbert icon ID into a block type when loading .txt levels.

World Loading Pipeline (GalaxyEggbertCNA)

GalaxyEggbertCnaGame::LoadContent():
  worldRuntime_.LoadFromVwrFile("worlds3d/world001.vwr")
  terrainRenderer_ = GETerrainRenderer(world, tileAtlas)
  // builds one Easy3D::CubeMeshRenderer for static blocks,
  // and a second one for animated blocks, rebuilt on anim-phase change
More detail Full binary layout: VWR Format. Loading internals: World Loading.