๐Ÿงโ€โ™€๏ธ Player Schema

Defines the main playable characterโ€™s stats, sprite, and controls.

โœ… Field Rules & Accepted Values

FieldTypeRequiredNotes
idstringโœ… YesUnique internal identifier (e.g., 'main_character'). Used in logic.
displayNamestringโœ… YesName shown in the game UI (e.g., 'Ayla').
healthnumberโœ… YesStarting HP (integer).
speednumber (float)โœ… YesHorizontal movement speed (e.g., 1.0).
jumpStrengthnumber (float)โœ… YesJump height/power.
gravityScalenumber (float)โœ… YesMultiplier for gravity (e.g., 1.0 = normal).
collidesbooleanโœ… YesIf true, interacts with platforms, walls, enemies.
invinciblebooleanโœ… YesIf true, cannot take damage.
abilitiesstring[]โœ… YesList of ability IDs (must match abilities schema).
spritestringโœ… YesSprite file (e.g., 'ayla.png').
sizeobjectโœ… YesPhysical dimensions in pixels.
controlsobjectโœ… YesKey mappings for ability/action triggers.

๐Ÿ‘ค player (global)

Defines the main playable character. This config connects with movement, abilities, UI, and game logic.

FieldTypeDescriptionRequiredExample
idstringUnique reference used in logic and events.โœ…"main_character"
displayNamestringOptional in-game name shown in dialog/UI.โŒ"Ayla"
healthnumberStarting health (can be 0โ€“100+ depending on gameplay).โœ…100
speednumberMovement speed multiplier (1.0 = default).โœ…1.0
jumpStrengthnumberVertical force applied when jumping.โœ…2.0
gravityScalenumberAffects fall rate (1 = normal, <1 = floaty, >1 = heavy).โœ…1.0
collidesbooleanWhether player can collide with world geometry.โœ…true
invinciblebooleanIf true, takes no damage (e.g. cutscene/cheat).โŒfalse
abilitiesstring[]List of ability IDs from the abilities schema.โœ…["dash", "jump"]
spritestringPath to character sprite asset.โœ…"ayla.png"
sizeobjectPhysical collision box in pixels.โœ…{ "width": 32, "height": 48 }
controlsobjectMaps abilities to keyboard/controller keys.โŒ{ "dash": "X" }