A modern, graphical remake of the classic River Raid game, built in C with Raylib. This edition features beautiful graphics, smooth gameplay, and professional code structure.
Main menu with difficulty selection and logs
Intense gameplay with multiple enemy types and power-ups
flowchart TD
MainLoop["main.c<br/>Main Game Loop"] -->|Initializes| GameLogic["game.c<br/>Game Logic & State"]
MainLoop -->|Initializes| Renderer["render.c<br/>Rendering & UI"]
MainLoop -->|Loads| Menu["menu.c<br/>Menu System"]
MainLoop -->|Loads| Play["play.c<br/>Gameplay State"]
GameLogic -->|Updates| Player["Player System"]
GameLogic -->|Updates| Enemies["Enemy System"]
GameLogic -->|Updates| Bullets["Bullet System"]
GameLogic -->|Updates| Powerups["Power-up System"]
GameLogic -->|Handles| Score["Score & Logs"]
Renderer -->|Draws| UI["UI & Visuals"]
Renderer -->|Draws| GameObjects["Player, Enemies, Bullets, Power-ups"]
Menu -->|Navigates| Difficulty["Difficulty Selection"]
Menu -->|Shows| Logs["Logs & High Scores"]
Play -->|Runs| GameLogic
Play -->|Renders| Renderer
GameLogic -->|Reads/Writes| FileIO["scores.txt, logs.c"]
MainLoop -->|Uses| Header["header.h<br/>Declarations & Structs"]
- Modern 2D Graphics (Raylib-powered)
- Smooth 60 FPS Gameplay
- Multiple Difficulty Levels
- Power-ups & Enemy Variety
- Persistent High Scores & Logs
- Professional, Modular C Code
- Docker Support for Easy Setup
- Cross-Platform: Windows, Linux, macOS
- Windows: Download Xming/XLaunch
- Linux: X11 is usually pre-installed
- macOS: XQuartz
- Windows: Launch XLaunch, select 'Multiple windows', 'Start no client', enable 'Disable access control' (for local testing)
- macOS: Start XQuartz
- Linux: Usually running by default
- Windows (PowerShell):
$env:DISPLAY="localhost:0.0"
- Linux/macOS:
export DISPLAY=:0
docker compose up --build- If you see no window, ensure your firewall allows connections to X11 (port 6000)
- On Linux, you may need:
xhost +local:docker
- GCC, Make, Raylib, X11 dev libraries (Linux)
sudo apt-get update
sudo apt-get install -y gcc make libraylib-dev libx11-dev
make
./RiverRaid- Use
build.batorbuild.ps1(PowerShell) - Or build with MinGW/MSYS2 and Raylib
Menu:
W/SorUp/Down: NavigateEnter/Space: SelectESC: Back
Gameplay:
WASD/Arrow Keys: MoveSpace/X: ShootP: PauseESC: Menu
River Raid/
├── main.c # Main entry point
├── game.c # Game logic
├── render.c # Rendering/UI
├── play.c # Gameplay state
├── menu.c # Menu system
├── header.h # Declarations/structs
├── logs.c # Logging
├── scores.txt # High scores
├── Makefile # Linux/macOS build
├── build.bat # Windows build
├── build.ps1 # Windows PowerShell build
├── Dockerfile # Docker build
├── docker-compose.yml # Docker Compose
└── README.md # This file
- Modular C code, well-commented
- Key modules:
main.c,game.c,render.c,play.c,menu.c,header.h - Persistent score/log system
- Easy to extend with new features
- X11 Display Issues:
- Ensure XLaunch/XQuartz/X11 is running
- Set
DISPLAYvariable as above - On Linux:
xhost +local:docker
- Raylib Not Found:
- Install with
sudo apt-get install libraylib-devor use Docker
- Install with
- Windows Build Issues:
- Use provided scripts (
build.bat,build.ps1) - Ensure MinGW/MSYS2 is in PATH
- Use provided scripts (
- Permissions:
chmod +x RiverRaid
Arian Kheirandish
Open source. Modify and distribute freely.
Pull requests and issues welcome!
- Multiplayer
- Sound & Music
- More enemies/power-ups
- Level progression
- Achievements
- Mobile port
Enjoy playing River Raid Enhanced Edition! 🚀