Not sure if this is the appropriate place for this post, but surely it is. May I christen this forum?
Many people advise beginners in game development to make a Tetris clone, but instead I made a Pong clone and then an Asteroids clone. Slowly moving through the history of gaming, you see.
Anyway, I present my second game, the Asteroids clone “Asterad”, for your perusal, both for the SDL components and the general game development / coding components. Not only am I fairly new to game dev and SDL/OpenGL, but I’m also pretty inexperienced in C. So I’d love to hear any advice or feedback or issues that you have.
Binaries: http://www.mediafire.com/?n4vyyy3ztyg
Source: http://github.com/gavinschultz/asterad
For those who don’t like click-through hosted files, you’re welcome to try http://github.com/gavinschultz/asterad/raw/master/bin/asterad1.0.1.zip, it’s just that GitHub seems to sometimes fail these downloads on some connections.
Some relevant points from the README.txt:
"Rendered with OpenGL, and using the SDL library. Best results are in full-screen mode, however windowed mode of any size should also work. Have fun!
Controls:
A turn left
D turn right
W thrust
SPACE fire
S start, respawn
R reset game
Q, Esc quit
Alt-Enter toggle windowed / full-screen
Some other less important keys include:
F2 toggle sound
F3 show bounding boxes
-
slow time (for the adolescent rush of "bullet time")
-
speed time
O hit all asteroids (cheat)
When entering a high score:
A, D scroll letters
S enter letter
This game has been released under the GPL. See the file COPYING for details.
A port to other platforms (such as Linux, Mac etc) should be reasonably easy; the author has neglected to make these simply because he only has a Windows installation. Note that the following parts of code may currently be Windows-specific:
- dirent.h - other platforms should use their installed version of dirent.h
- game.h and hiscore.h - a couple of directory defines use backslashes ()
- game.c - WinMain() is used instead of main()"
Thanks so much!
P.S. A big thanks to Sam and the SDL team for making it easy to get into this sort of stuff.