Game score does not work #6
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
3 sessions recorded, all with score 0, level 1, 0 lives used, and end_reason: "quit". The game is sending session start and end correctly, but the end payload always has zeroes — the game client isn't populating the score/level/lives data in the session end request.
DESIGN.md for reference:
Game Analytics & Highscores
Track comprehensive play session analytics and submit them to a backend service
for leaderboards and gameplay insights. Data flows from C → JS (via EM_JS) →
backend API (via fetch). Desktop builds can write to a local file as fallback.
Metrics to track (GameStats struct)
Per-run (reset on new game / restart):
levels_completedenemies_killedkills_by_type[N]deathstime_elapsed_msshots_firedshots_hitdamage_takendamage_dealtdashes_usedjumpsdistance_traveledpickups_collectedlongest_kill_streakcurrent_kill_streakPer-level snapshot (ring buffer or array, flushed on level exit):
Data flow