🗺️ Level Schema

Defines each game level’s layout, objects, transitions, and unlock logic.

✅ Field Rules & Accepted Values

FieldTypeRequiredNotes
idnumber✅ YesUnique level ID
namestring✅ YesLevel title (UI-friendly)
descriptionstring❌ NoShown in menu
size{width, height}✅ YesIn tiles or pixels
entryPoint{x, y}❌ NoPlayer spawn location
musicstring❌ NoBackground music file or ID
backgroundstring❌ NoSkybox or parallax image
tilemapstring❌ NoOptional layout source
tokensstring[]✅ YesPlaced token IDs (from TOKENS)
npcsstring[]✅ YesNPCs placed (from NPC schema)
enemiesstring[]✅ YesEnemy IDs (from ENEMIES)
eventsstring[]❌ NoCutscenes or triggers
lockedboolean❌ NoDefaults to false
unlockConditionobject❌ Noe.g. { questCompleted: 'intro_mission' }
exitsarray❌ NoLevel links: { toLevel, position, spawnPoint }