Asterad - an Asteroids (1979) clone

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.


For those who don’t like click-through hosted files, you’re welcome to try, 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!

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.


I think your game is great!!!

really weelldone!

did you draw everything using the OpenGL primitives??


Thanks MandarX, I appreciate it!

Yes, it’s all OpenGL primitives: just points, lines and lineloops. I’m still very new to OpenGL, so I can’t do any OpenGL special effects yet!



That`s awsome, really cool particle effects!

This is really well done, I’m currently attempting myself to make a game that has ships.
I’m finding it quite hard about how to go about it, I’m currently looking at the source and will hopefully learn a thing or two :)!


First off I commend you for taking on such a classic. This is exactly what this game needed, is the same functionality with some cool customized features. I’m impressed and addicted. I was hoping I would find a couple cool games by doing a forum search, nicely done. I am very interested in this because I have actually been considering setting up some kind of arcade classics cloud service, so this would be a cool idea to add to the archive is modified versions of the original. I just need to figure out which kind of service to use. Do you guys have any knowledge of how to integrate files I converted with a video converter in to the games?