Root cause of unstable speed: nextTick was reset to 'now + speed' each step, accumulating timing drift. Now uses 'nextTick += speed' with a floor (if nextTick < now, reset to now) to prevent drift and catch-up spirals. - Both games: 30 fps render cap (FRAME_MS = 33 ms), nextTick updated cumulatively to eliminate drift. - Snake: base speed 90 px/sec (~100 ms per step at cell=9), turn queue unchanged, edge wrap unchanged. - Tetris: gravity step uses cumulative nextTick, controls unchanged.
17 KiB
Executable File
17 KiB
Executable File