Luxferre
eee12181c7
games: responsive game loop with non-blocking input polling
...
Replaced the blocking select()-based main loop with a proper game loop:
- Process ALL pending X11 input (XPending) before every frame — no more
missed keypresses from select() blocking for up to a full frame
- Render every frame at 30 fps (FRAME_MS = 33 ms) consistently
- Frame pacing uses select() with a timeout that wakes immediately on
input, so keypresses are processed within milliseconds
- Game logic (snake steps, tetris gravity) still runs at its own rate via
nextTick, decoupled from render rate
This eliminates input lag and missed keypresses in both Snake and Tetris.
2026-10-24 09:03:38 +03:00
..
2026-10-21 14:46:11 +03:00
2026-10-22 22:30:43 +03:00
2026-10-19 09:23:54 +03:00
2026-10-21 17:37:51 +03:00
2026-10-20 21:15:16 +03:00
2026-10-20 21:15:16 +03:00
2026-10-22 22:15:28 +03:00
2026-10-22 10:17:24 +03:00
2026-10-20 21:15:16 +03:00
2026-10-20 23:56:20 +03:00
2026-10-20 23:56:20 +03:00
2026-10-24 09:03:38 +03:00
2026-10-22 16:10:56 +03:00
2026-10-20 21:15:16 +03:00
2026-10-23 16:54:13 +03:00
2026-10-19 23:34:06 +03:00
2026-10-20 21:15:16 +03:00
2026-10-21 12:32:21 +03:00
2026-10-21 12:54:26 +03:00
2026-10-21 12:54:26 +03:00
2026-10-21 12:54:26 +03:00
2026-10-21 12:54:26 +03:00
2026-10-21 12:54:26 +03:00
2026-10-21 17:37:51 +03:00
2026-10-22 22:15:28 +03:00
2026-10-21 14:46:11 +03:00
2026-10-23 08:45:42 +03:00
2026-10-20 21:15:16 +03:00
2026-10-19 09:23:54 +03:00
2026-10-20 21:15:16 +03:00
2026-10-22 10:17:24 +03:00
2026-10-19 23:34:06 +03:00
2026-10-22 10:17:24 +03:00
2026-10-22 10:17:24 +03:00
2026-10-21 14:46:11 +03:00
2026-10-20 21:15:16 +03:00
2026-10-20 21:15:16 +03:00
2026-10-19 23:34:06 +03:00
2026-10-22 22:04:01 +03:00
2026-10-20 21:15:16 +03:00
2026-10-22 22:15:28 +03:00
2026-10-20 21:15:16 +03:00
2026-10-21 00:16:33 +03:00
2026-10-22 23:54:45 +03:00
2026-10-19 09:23:54 +03:00
2026-10-22 22:15:28 +03:00
2026-10-20 21:15:16 +03:00
2026-10-24 09:03:38 +03:00
2026-10-20 21:15:16 +03:00
2026-10-20 21:15:16 +03:00
2026-10-21 11:11:45 +03:00
2026-10-22 10:17:24 +03:00
2026-10-21 14:46:11 +03:00
2026-10-21 12:32:21 +03:00
2026-10-21 11:11:45 +03:00
2026-10-21 17:37:51 +03:00
2026-10-21 11:11:45 +03:00
2026-10-21 11:11:45 +03:00
2026-10-21 14:46:11 +03:00
2026-10-20 21:15:16 +03:00
2026-10-21 14:46:11 +03:00
2026-10-21 20:36:27 +03:00