🐣 Mobile Eggbert

Data Formats

Mobile Eggbert uses two custom file formats: a binary save data file and text-based world (level) files.

Save Data Format

Managed by GameData. A flat 640-byte binary array written to the platform's persistent storage (IndexedDB on web, file system on desktop/Android).

Binary Layout

OffsetSizeContent
0–910 bytesHeader: version, selected gamer index, global settings (sound on/off, jump mode, zoom level, accelerometer on/off)
10–219210 bytesGamer slot A: lives remaining, last world reached, 200-byte door state array
220–429210 bytesGamer slot B (same structure)
430–639210 bytesGamer slot C (same structure)

Gamer Slot Layout (210 bytes)

Offset within slotSizeContent
01 byteNumber of lives remaining
11 byteLast world number reached
2–201200 bytesDoor state array — one byte per door, 0=locked, 1=opened
202–2098 bytesPadding / reserved

Serialization

Written and read via Worlds::ReadGameData() / Worlds::WriteGameData(). Key accessors:

  • getSelectedGamerProperty() / setSelectedGamerProperty(int)
  • getNbViesProperty() / setNbViesProperty(int)
  • getLastWorldProperty() / setLastWorldProperty(int)

World File Format

Levels are stored as line-delimited text files in worlds/worldNNN.txt. Each file describes a 100×100 tile grid plus metadata.

File Structure

# Line 1: metadata (DescFile fields as name=value pairs)
posDecor=x;y dimDecor=w;h world=N music=M region=R blupiPos=x;y blupiDir=d name=LevelName

# Following lines: Decor section (base tile layer)
# 100 lines, each with 100 comma-separated icon indices
icon0,icon1,...,icon99
...

# BigDecor section (secondary decorative layer)
# Same format as Decor section

# Doors section (door state array)
# Only non-default (non-1) values are written; format is compact

Field Value Formats

TypeFormatExample
intPlain integerworld=5
doubleTrailing .0time=30.0
boolTrue or Falserain=False
TinyPointx;yblupiPos=3;7
arraycomma-separated1,2,3,4,…

Level Numbering Scheme

File rangeContent
world001.txtTutorial level
world010–world019Chapter 1 (levels 0–9)
world020–world029Chapter 2
world030–world039Chapter 3
… (pattern continues) …Chapters 4–9
world090–world099Chapter 9
world100–world199Chapters 10–19
world199.txtFinal bonus level

DescFile Metadata Fields

The metadata line on line 1 of each world file uses the following named fields:

FieldTypeDescription
posDecorTinyPointInitial scroll position (tile coords)
dimDecorTinyPointDimensions of the active world area (tiles)
worldintWorld/level number
musicintBackground music track index
regionintRegion/chapter number
blupiPosTinyPointPlayer starting position (tile coords)
blupiDirintPlayer starting direction (1=Left, 2=Right)
namestringLevel display name (used in ranking screen)
Doors Section Compression The Doors section in world files uses a sparse format: only non-default values are written. The default door state is 1 (open/traversable), so a completely untouched door array would produce an empty Doors section. This keeps level files compact.