cShooter is a retro-style 2D shooter game written entirely in C, built from the ground up using only SDL2 and its companion libraries.
No engines, no frameworks — just pure C, SDL, and classic game-development fundamentals.
This project was created as a hands-on exploration of low-level game programming, focusing on rendering, input handling, audio, and game logic.
- 🎮 Real-time 2D gameplay with keyboard controls
- 🖼️ Rendering via SDL2
- 🔊 Sound effects using SDL2_mixer
- 🎯 Enemy spawning and collision handling
- 🧠 Simple but expandable game logic
- 🛠️ Built entirely in C — no game engine involved
Control a player character in a top-down shooter environment:
- Move around the screen
- Shoot incoming enemies
- Avoid collisions and survive as long as possible
- C
- SDL2
- SDL2_image
- SDL2_mixer
SDL (Simple DirectMedia Layer) provides low-level access to graphics, input devices, and audio across platforms.
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-devbrew install sdl2 sdl2_image sdl2_mixer- Download SDL2 development libraries
- Configure include and library paths in your compiler or IDE
- A Visual Studio solution (
cShooter.sln) is included
git clone https://github.com/noahlin34/cShooter.git
cd cShooter
gcc -o cShooter src/*.c -lSDL2 -lSDL2_image -lSDL2_mixer
./cShooterOr open cShooter.sln in Visual Studio on Windows.
| Key | Action |
|---|---|
| WASD / Arrow Keys | Move |
| Space / Ctrl | Shoot |
| ESC | Quit |
This project was made possible through the use of freely available assets generously shared by the community.
- 🎨 Visual elements from Kenney
- 🔊 Sounds by ZapSplat, soundslikewillem, and MikeE63
All assets are used under their respective free-use licenses. Full credit goes to the original creators.
- Additional enemy types
- Power-ups and weapon variety
- Score tracking and UI polish
- Improved AI behaviors
- Game states (menu, pause, game over)
Contributions are welcome!
Fork the repository, create a branch, and submit a pull request.
This project is open-source and intended for educational and personal use.
Feel free to explore, modify, and build upon it — attribution is appreciated.
⭐ Thanks for checking out cShooter!