A cross-platform, top-down 2D space shooter written in C using only platform libraries.
MIT License
A cross-platform, top-down 2D space shooter written in C using only platform libraries.
space-shooter.c
is a cross-platform, top-down 2D space shooter written in standard C11 using only platform libraries (with platform libraries defined as anything included in the C standard library or supported platforms). space-shooter.c
has been tested on Windows 10, Ubuntu Linux 16.04, Chrome 103 and Firefox 103. This project drew heavy inspiration from Handmade Hero and pacman.c.
The design and architecture of space-shooter.c
is described here.
I am not a professional game developer, nor a professional C programmer, so the design may be unconventional or sub-optimal in many ways. Happy to take feedback from any pros out there!
Windows
build.bat
for a debug build or build.bat release
for an optimized build.space-shooter.exe
from the build/
directory.Linux
sudo apt install linux-libc-dev libx11-dev mesa-common-dev libasound2-dev
make linux
for a debug build or make linux-release
for an optimized build../space-shooter
from the build/
directory.Web
make web
for a debug build or make web-release
for an optimized build.build/
directory for debug builds or the site/
directory for release builds from a local web server (e.g. python -m SimpleHTTPServer
), and open the page in Chrome or Firefox.I hope to work on a Mac platform layer as soon as I have a Mac machine to work on.
Since this project is intended as a personal challenge, I am not accepting external contributions at this time. I am very open to feedback, however, so feel free to open an issue for anything that needs fixing.