How marvelous616/pong works
PONG is a Linux framebuffer Pong game. The principal workflow is keyboard input → game-state updates and collision handling → drawing the scene and score into a CPU framebuffer → copying it to the display. The README also documents configurable screen dimensions and input-device setup; the source shows framebuffer initialization and the main loop. Some declared modules and integrations are unsampled, so uncertain connections are omitted.
Main entry points: main.c Game loop · inp_event.c Keyboard events · render.c CPU framebuffer · entity.c Entity model
Components 11
Game
- Game loop
src/main.c
Input
- Keyboard events
src/inp_event.c
Graphics
- CPU framebuffer
src/render.c - Score typography
src/num.c - Sprite tools
src/sprite.c - Image data
468x897_hand_dithered_1_bit.data
Game model
- Entity model
src/entity.c - Points and pixels
include/point.h
Other components
- Player
- Linux input device
- Linux framebuffer
Connections 11
- Player → Keyboard events: provides input
README.md - Keyboard events → Linux input device: reads events
- Game loop → Keyboard events: updates input
src/main.c - Game loop → CPU framebuffer: initializes and draws
src/main.c - Game loop → Score typography: draws score
src/main.c - Game loop → Linux framebuffer: maps display
src/main.c - CPU framebuffer → Linux framebuffer: copies pixels
- Game loop → Image data: maps image
src/main.c - Entity model → Points and pixels: uses positions
- Entity model → Sprite tools: uses sprites
- Sprite tools → CPU framebuffer: draws sprites