Games App: Pong, Snake and Tetris #102

Merged
twisla merged 3 commits from games into main 2026-10-13 21:09:00 +00:00
Owner

Closes #101.

  • Games App: a new tile in the Launcher. It shows its three Games as icons, as the Launcher shows Apps; a Game left in the middle is found again paused, with the orange dot on its icon.
  • Pong against the device (first to 7, a paddle that can be beaten), Snake (38 x 19, the walls kill), Tetris (10 x 20, the 7-bag, the next piece shown, a turn that shifts away from a wall, soft and hard drop). Each is a seeded state machine in lib/games, with no screen or keyboard in it.
  • Held keys: KeyMapper::held(), for a paddle that moves while a key is held and for Tetris's repeat. Apps only heard presses.
  • The tune: Tetris plays Korobeiniki a note at a time on a speaker channel of its own, faster with each level. 0 switches it, 8 and 9 set its volume; both are remembered.
  • Keys: the hard drop is on 1, away from the arrows. p pauses, Enter starts, Back returns to the three games.
  • A Game being played keeps the screen lit (App::keepsScreenOn), and is not the quiet moment a self-installing update waits for.
  • The best of each Game is kept in internal flash.
  • Docs: guide page, README, key tables, glossary (Game).

Changed from the design round on the issue, after playing: icons instead of a list, the drop off Space, and music after all.

Tested

  • Host tests: 673 pass, 47 new (44 for the Games and the tune, 3 for held keys).
  • On the device: all three played by hand; speeds, the soft drop, the tune and its volume tuned there.
  • Cost: 14,616 bytes of flash, 8 bytes of static RAM.
  • Not checked: Tetris at its higher levels (and so the tune at its fastest), battery over a long session at 30 frames a second.

🤖 Generated with Claude Code

https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk

Closes #101. - **Games App**: a new tile in the Launcher. It shows its three Games as icons, as the Launcher shows Apps; a Game left in the middle is found again paused, with the orange dot on its icon. - **Pong** against the device (first to 7, a paddle that can be beaten), **Snake** (38 x 19, the walls kill), **Tetris** (10 x 20, the 7-bag, the next piece shown, a turn that shifts away from a wall, soft and hard drop). Each is a seeded state machine in `lib/games`, with no screen or keyboard in it. - **Held keys**: `KeyMapper::held()`, for a paddle that moves while a key is held and for Tetris's repeat. Apps only heard presses. - **The tune**: Tetris plays Korobeiniki a note at a time on a speaker channel of its own, faster with each level. `0` switches it, `8` and `9` set its volume; both are remembered. - **Keys**: the hard drop is on `1`, away from the arrows. `p` pauses, Enter starts, Back returns to the three games. - A Game being played keeps the screen lit (`App::keepsScreenOn`), and is not the quiet moment a self-installing update waits for. - The best of each Game is kept in internal flash. - Docs: guide page, README, key tables, glossary (**Game**). Changed from the design round on the issue, after playing: icons instead of a list, the drop off Space, and music after all. ## Tested - Host tests: 673 pass, 47 new (44 for the Games and the tune, 3 for held keys). - On the device: all three played by hand; speeds, the soft drop, the tune and its volume tuned there. - Cost: 14,616 bytes of flash, 8 bytes of static RAM. - Not checked: Tetris at its higher levels (and so the tune at its fastest), battery over a long session at 30 frames a second. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
twisla added 3 commits 2026-10-13 21:03:01 +00:00
Apps heard a key once, when it went down. A Game that moves something
for as long as a key is held (issue #101) asks the key mapper instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
The rules of the three Games (issue #101), with no screen and no
keyboard in them: time and keys go in, the new state and what happened
come out, and a seed decides the dice. With a player for a tune a note
at a time, and Korobeiniki's notes. Host-tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
Games App: Pong, Snake and Tetris
Site / build (pull_request) Successful in 10s
CI / build (pull_request) Successful in 2m20s
ec15c2f52a
A new App (issue #101) that shows its three Games as icons, as the
Launcher shows Apps, and plays the one chosen. A Game left in the middle
is found again paused; one being played keeps the screen lit. Tetris
plays Korobeiniki on a speaker channel of its own, faster with each
level: 0 switches it, 8 and 9 set its volume, both remembered. The drop
is on 1, away from the arrows. The best of each Game is kept.

Played on the device. The speeds are as tuned there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
twisla merged commit 8cbc641d20 into main 2026-10-13 21:09:00 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: twisla/roro9stack#102