What it does
results
End-of-round screens for scoreKit: pure functions that turn a ResultsData (see demo.module) into a UI widget tree in any of the five theme looks (arcade, minimal, scifi, fantasy, cartoon). A game's round-over flow calls Results.render(id, look, results, { w, h, t, narrow }) each frame with t = seconds since the screen appeared. Entrances cascade in over ~0.6 s, count-ups settle by ~2.5 s, and below 520 points wide the screens use a single-column phone layout.
| id | screen |
|---|---|
ratingCard | Stars that pop in one by one, a big grade medallion, the score and this round's place, a breakdown table adding up to the total, best combo / max multiplier chips. |
celebration | NEW PERSONAL BEST or NEW WORLD RECORD over rays and confetti, with the new score, the previous best, the improvement and the board rank. A calm "Good run" with what it takes to beat your best when neither. |
tally | A tally that counts up: each breakdown line appears and counts from 0, a running total climbs, then the final total punches in with stars and grade. |
timeTrial | The final time big, each split against its best with green (ahead) / red (behind) deltas and a diverging bar, a PB / record badge and the time to beat. A first run with no best says so. |
Results.views lists each screen with its natural size and tags; Results.ids() and Results.get(id) read it.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.