Asteroids - My First Proper Game!
Posted: Mon Jan 31, 2011 3:26 pm
I've played around with SDL and OpenGL for a while, but never actually committed to any kind of project using them before. After following tutorials for the past few weeks, I decided to create a clone of Asteroids to test my skills....
Download:
Windows: http://www.mediafire.com/?3lf3u3h4dfdwjmo
Linux: http://www.mediafire.com/?twuf4jlgdkdx4tw
Cool Stuff:
-Multiplatform, runs on linux (though only tested in Ubuntu!) and windows.
-I used OpenGL for graphics, SDL for everything (window management, sound etc)
-Collisions between asteroids
-Scores are saved and shown on the high scores screen
-Options screen (you can only change the fullscreen mode, but hey...)
-Menu system, buttons react to mouse over and mouse click
Compared to the wonderful things that are created by some of you guys, it's really not much.... but I think it turned out okay (:
Now some questions for you geniuses.
1. For text, I just drew some textured quads (using SDL_ttf to generate the surfaces from a font file, and then converted to OpenGL textures). Is this the usual/right way to do it? I know there's a few other ways to display text in OpenGL like raster etc... Would you recommend any of these for my kind of situation over textured fonts? I mean as long as everything is cleaned up okay, that's fine right?
2. You can see I have a few different 'screens' (menu, main game, options, scores..). Everytime the user goes from one screen to the other, I would cleanup everything for the previous screen and then load everything for the next. Would it be any better to load everything when the application first starts, and cleanup when it ends? Stuff like SDL and subsystems are initialised when the program first opens of course...
3. Any improvements you can suggest for it? XD
4. What should I do next?
Thanks guys!
Download:
Windows: http://www.mediafire.com/?3lf3u3h4dfdwjmo
Linux: http://www.mediafire.com/?twuf4jlgdkdx4tw
Cool Stuff:
-Multiplatform, runs on linux (though only tested in Ubuntu!) and windows.
-I used OpenGL for graphics, SDL for everything (window management, sound etc)
-Collisions between asteroids
-Scores are saved and shown on the high scores screen
-Options screen (you can only change the fullscreen mode, but hey...)
-Menu system, buttons react to mouse over and mouse click
Compared to the wonderful things that are created by some of you guys, it's really not much.... but I think it turned out okay (:
Now some questions for you geniuses.
1. For text, I just drew some textured quads (using SDL_ttf to generate the surfaces from a font file, and then converted to OpenGL textures). Is this the usual/right way to do it? I know there's a few other ways to display text in OpenGL like raster etc... Would you recommend any of these for my kind of situation over textured fonts? I mean as long as everything is cleaned up okay, that's fine right?
2. You can see I have a few different 'screens' (menu, main game, options, scores..). Everytime the user goes from one screen to the other, I would cleanup everything for the previous screen and then load everything for the next. Would it be any better to load everything when the application first starts, and cleanup when it ends? Stuff like SDL and subsystems are initialised when the program first opens of course...
3. Any improvements you can suggest for it? XD
4. What should I do next?
Thanks guys!