Sunfall Ridge
README.md
progress
Sunfall Ridge's player progression: the feathers each flight earns (0 to 3), the bests, and the
gliders and trails they unlock. require("sunfall.progress").
Where it saves
Each player's profile is one record at sunfall/profile in that player's own runtime_data
store (runtime_data.player(runtime_data.localId())). The engine keeps that store on ZeroMind,
so a player's feathers, bests and choices are there again when they leave and come back, on any
device, and no other player can write them. A signed-out session (localId() nil) has no store;
it plays with a profile held for the session only, and Progress.persistent() reads false.
API
Progress.profile()->{ bestScore, bestFeathers, totalFeathers, flights, landings, glider, trail }Progress.gliders()/Progress.trails()-> ordered{ id, label, description, need, unlocked, selected }. Gliders (glideKit styles):hangGlider0,paraglider3,birdWings7,wingsuit12 feathers. Trails (glideKit trails):none0,wingtips1,feathers4,streaks8,rainbow14.Progress.select(kind, id)-> boolean:kindis"glider"or"trail"; a locked or unknown id is refused.Progress.award(result)->{ newBest, unlocked = { label } }: counts the flight, adds the result's feathers (and a landing whenoutcome == "landed"), raises the bests, saves, and names every glider or trail the new feather total unlocked.Progress.onChanged(fn)-> unsubscribe:fn(profile)after an award, a selection, a reset, or a save from another session of the same player.Progress.reset(): back to a first flight.Progress.persistent(): whether a per-player store backs the profile.
Who calls it
The Run component awards a finished flight and reads the selected glider and trail; the
SunfallUi title screen lists the pickers and selects; the result screen shows what was unlocked.