Skip to content

noahlin34/cShooter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👾 cShooter

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.


🚀 Features

  • 🎮 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

🎮 Gameplay Overview

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

🛠️ Tech Stack

  • C
  • SDL2
  • SDL2_image
  • SDL2_mixer

SDL (Simple DirectMedia Layer) provides low-level access to graphics, input devices, and audio across platforms.


📦 Installation

Linux

sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev

macOS

brew install sdl2 sdl2_image sdl2_mixer

Windows

  • Download SDL2 development libraries
  • Configure include and library paths in your compiler or IDE
  • A Visual Studio solution (cShooter.sln) is included

🧱 Build & Run

git clone https://github.com/noahlin34/cShooter.git
cd cShooter
gcc -o cShooter src/*.c -lSDL2 -lSDL2_image -lSDL2_mixer
./cShooter

Or open cShooter.sln in Visual Studio on Windows.


🎹 Controls

Key Action
WASD / Arrow Keys Move
Space / Ctrl Shoot
ESC Quit

📜 Attributions

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.


🔮 Future Improvements

  • Additional enemy types
  • Power-ups and weapon variety
  • Score tracking and UI polish
  • Improved AI behaviors
  • Game states (menu, pause, game over)

🤝 Contributing

Contributions are welcome!
Fork the repository, create a branch, and submit a pull request.


📄 License

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!

About

2d shooter, created entirely in C with SDL2

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages