Files
bananarchy/prebuilt/games/usr/bin/tetris
T
Luxferre eb78f314a3 games: rewrite both games with fixed-timestep accumulator loop
The snake speed instability was caused by cumulative timing drift in the
select()-based loop (nextTick reset to now+speed each step). Both games now
use a fixed-timestep accumulator: elapsed time is accumulated each frame and
the game logic steps when enough has built up, so movement is perfectly
periodic regardless of frame timing or rendering cost. Frame pacing caps
elapsed at 200ms to prevent a spiral of death.

Both files were fully rewritten to eliminate structural corruption (duplicate
function definitions / missing braces) introduced by many incremental edits:
- Snake: turn queue (max 2), batched body rendering, 90 px/sec base, 30 fps.
- Tetris: batched beveled-block rendering (XFillRectangles), Gameboy palette,
  XK_KP_Divide pause, 30 fps accumulator loop.

Both compile cleanly (no -Wall/-Wextra warnings) as valid armv7 ELF.
2026-10-24 10:31:10 +03:00

17 KiB
Executable File