2.9 KiB
2.9 KiB
PONG 2026
A deliberately over engineered Pong clone in Odin with raylib.
Retro line-based graphics with a CRT post-processing shader.
Screenshots
Why Over-Engineered?
While the game could have been done in a single file, the goal was to structure the project like a small production game instead:
- Manager-per-subsystem: audio, input, event, level, particle, and scene managers, each in its own file
- Event system: decoupled communication between systems (
event_manager.odin) instead of direct calls - Scene management: state/scene stack for menus, gameplay, etc. (
scene_manager.odin) - Entity layer: shared base entity with ball, player, and opponent specializations
- Input abstraction: keyboard and gamepad behind one interface
- Data-driven assets: audio and shaders loaded from
assets/, not embedded
The idea behind breaking it into systems is so that it can help build my foundations into more complex games.
Features
- Single-player vs AI opponent
- CRT fragment shader (
assets/shaders/crt.fs) - Particle effects, sound effects, music
- Gamepad support via SDL controller mappings
Controls
| Action | Keyboard | Gamepad |
|---|---|---|
| Move | W(up) S(down) | Left Joystick |
| Select | Enter | A button |
| Pause | Spacebar | Start button |
Requirements
Please note, I have not built this on MacOs or Windows, only linux. While in theory if you have the odin compiler it should just work as there is no external libs besides those bundled with Odin.
- Odin compiler (version dev-2026-10:e87445a58)
- raylib (bundled with Odin as
vendor:raylib) - GPU/driver with OpenGL 3.3 support (shader uses
#version 330)
Build & Run
./build.sh # see build.sh for flags and options
./out/pong
Project Layout
assets/
audio/ music, SFX, UI sounds
shaders/ crt.fs
screenshots/ README images
src/
main.odin entry point
game.odin game state and loop
*_manager.odin audio, event, input, level, particle, scene
entity*.odin base entity, ball, player, opponent
out/ build output
build.sh build script
Credits
Sourced from the web, not mine.
| File | Title | Author | Source | License |
|---|---|---|---|---|
... |
TODO | TODO | URL | TODO |
Third-Party
gamecontrollerdb.txt: SDL_GameControllerDB (zlib)- raylib by Ramon Santamaria (@raysan5), zlib
- Odin, BSD-3-Clause
License
MIT, see LICENSE. Any third-party assets retain their original licenses, listed above.


