A 2D asteroids clone using SDL framework.
Originally developed on Ubuntu 12.04 using SDL Media Library V1.2 back in 2012.
More Information on SDL, the "Simple Direct Media Layer", can be found on the official SDL Website or the un-official GiHub Mirror.
- GCC to compile plain C-Files
- Development Libs for SDL
Be sure to have the proper Version of SDL with the Development Libraries on your local Machine.
Otherwise, open a Terminal and type as admin:
apt-get install libsdl1.2-dev
to install your local Development Headers and Libraries for the latest SDL 1.2.
To create an Executable, go to the root-Folder and type:
<project-root>$ gcc -o them-rocks src/main.c `sdl-config --cflags --libs`
where "-o" stands for the final Name of the Executable, so you're to change this.
The part in between the Backticks dynamically evaluates the necessary Header Files and Libraries
that SDL needs to sucessully compile. It's a shorthand Notation to something like
<project-root>$ gcc -o them-rocks-bin src/main.c -I/usr/include/SDL -L/usr/lib/x86_64-linux-gnu -lSDL
Otherwise, feel free to import the Project Folder into your IDE of choice (ex., Eclipse Neon CDT). Be sure to set Includes and Link-Paths appropriate and start the Build.
Run the compiled Binary afterwards with
<project-root>$ ./them-rocks
and watch up for the Folder "Data" that contains the Game Data.
Inspired by "C++ für Spieleprogrammierer" by Heiko Kallista, and ported to plain C99 for Lecture Purposes back in 2009.