Initial detailed Readme V1.0
This commit is contained in:
@@ -1,3 +1,86 @@
|
||||
# pong_raylib
|
||||
# PONG 2026
|
||||
|
||||
Classic pong implemented in Odin and Raylib
|
||||
A deliberately over engineered Pong clone in [Odin](https://odin-lang.org) with [raylib](https://www.raylib.com).
|
||||
|
||||
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](https://github.com/mdqinc/SDL_GameControllerDB) (zlib)
|
||||
- [raylib](https://github.com/raysan5/raylib) by Ramon Santamaria (@raysan5), zlib
|
||||
- [Odin](https://github.com/odin-lang/Odin), BSD-3-Clause
|
||||
|
||||
## License
|
||||
MIT, see [LICENSE](LICENSE).
|
||||
Any third-party assets retain their original licenses, listed above.
|
||||
|
||||
Reference in New Issue
Block a user