Scores & progress data

Avalanche keeps everything in Firestore so you always know who is leading, who unlocked a shield, and how the session unfolded.

Live statsEvent logPost-game export

Live player metrics

  • `questionsAnswered` and `correctAnswers` increment after each submission – use them to calculate accuracy on the fly.
  • `currentPosition` and `percentageCompleted` drive both the host leaderboard and the player-side progress badge.
  • Coordinates (`x`, `y`) map the player marker on the mountain board. They update whenever position changes so the host view animates correctly.
  • `lastCheckpoint` remembers the tile used when an avalanche resolves. Shields simply skip the reset, leaving the last checkpoint untouched.

Tip: Because the values live on the player document, you can build custom overlays or analytics dashboards by subscribing to the same Firestore path.

Session events

  • Each avalanche trigger writes an event document with the avalanche ID, affected player, and timestamp.
  • Weather changes and manual checkpoint adjustments also create event entries so you can reconstruct the match timeline later.
  • Shield usage logs include which avalanche was blocked and when it happened (`shieldUsedFor`, `shieldUsedAt`).
  • Use the host log drawer during the session to narrate highlights; the feed reads directly from the events collection.

Tip: If the event stream looks empty, check Firestore rules. The host user must have permission to read the `events` subcollection.

Post-game wrap-up

  • Export results by downloading the `games/{gameId}/players` collection from the Firebase console or via a quick script.
  • For classroom play, sort by `percentageCompleted` or `correctAnswers` to call out podium finishes.
  • If you plan a rematch, duplicate the game document. Players can reuse the new code without recreating profiles.
  • Need historical tracking? Copy player stats into your own analytics store before deleting old game documents.

Tip: Keep raw data for at least one extra day – it helps when someone asks to verify a result or contest an avalanche call.

Leaderboard tips

  • The host mountain board sorts players by `percentageCompleted`. Tie-breakers use the raw position so you always have a single leader.
  • Players see only their own stats on the question screen, but you can screen-share the host board for full transparency.
  • If you pause the game, percentages stop updating but the board stays visible so you can debrief mid-session.
  • Use the encouragement messages as soft feedback. Celebrating streaks openly helps keep energy high even when the leaderboard is close.