Memorize and reproduce the digits of π. The sequence grows one digit each successful round. You get 3 lives; a mistake or a timeout costs one. How far can you go?
- A new digit is revealed (bold) at the end of the current known prefix of π (displayed as
3.1415…). - Digits are briefly shown, then hidden.
- Enter the sequence using the on‑screen keypad (no backspace—instant validation per digit).
- Finish the full sequence to advance; a wrong digit or time expiry loses a life.
- Lose all 3 lives → Game Over.
- Progressive memory loop with per‑digit immediate validation.
- Automatic formatting: first digit then decimal (3.x) for readability.
- Lives system (❤️ hearts) with animated loss overlay (pop + grayscale) and delayed final Game Over reveal.
- Milestones at 10 / 20 / 30 digits:
- Medal icon next to score (🥉 / 🥈 / 🥇)
- Confetti celebration at first milestone (10)
- Background theme shifts by tier.
- Floating emoji feedback (👍, 🏆) for correct rounds & milestones.
- Haptic & visual keypad feedback (press pulse, shake on error, vibration patterns where supported).
- Timer bar with per-round calculated time (base + per‑digit).
- Local best score persistence via
localStorage. - Optional debug start length field for quick testing.
- Internationalization (auto‑detected via
navigator.language) with fallback to English.- Languages: English (en), French (fr), German (de), Spanish (es), Polish (pl), Norwegian (no), Portuguese (pt).
- Game Over update broadcast via
webxdc.sendUpdatewith score summary.
| File | Purpose |
|---|---|
src/index.html |
Markup/screens (start, round, game over) + keypad |
src/main.js |
State machine, timing, input handling, animations, confetti, i18n apply |
src/styles.css |
Layout, themes, animations (hearts, keypad, confetti) |
src/i18n.js |
Translation dictionary & helper |
src/manifest.toml |
webxdc metadata |
No external runtime dependencies; pure HTML/CSS/JS.
Run with the webxdc dev tool:
webxdc-dev run srcThis launches the simulator. Open the console for logs if needed. Use the debug input on the start screen to jump to a higher starting length for testing long sequences.
Create a distributable .xdc (zip of src contents):
mkdir -p dist && (cd src && zip -9 --recurse-paths - *) > dist/pi-flash.xdcShare dist/pi-flash.xdc in any Delta Chat / webxdc compatible client.
- Adjust milestone thresholds: edit
MILESTONESinmain.js. - Add more digits of π: extend
PI_SOURCEstring. - Add languages: extend
i18n.jsobject (two‑letter code) and translations. - Tune animations: see keyframes in
styles.css(heart-pop,pad-fail, confetti).
- Bonus prediction rounds (guess next unseen digit) for bonus points.
- Global high‑score merging via received updates.
- Optional sound effects (correct, wrong, milestone fanfare).
- Accessibility: larger text mode toggle for long sequences.
MIT.
Made for the webxdc platform. Have fun memorizing π! 🥧
