Asteroids - My First Proper Game!

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Post Reply
TLcipher
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 5
Joined: Sat Jan 29, 2011 7:45 pm

Asteroids - My First Proper Game!

Post by TLcipher »

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! :cheers:
User avatar
cypher1554R
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1124
Joined: Sun Jun 22, 2008 5:06 pm

Re: Asteroids - My First Proper Game!

Post by cypher1554R »

First of all welcome to our boards :cheers:
and great job on building your game. Looks tasty.

1. If it doesn't create any bugs, memory leaks or lags and you don't have anything against the way it looks, I say it's a go.
2. I think that theoretically, you're doing it right. Menu, options, scores are separated from actual game. But in this case it's not really that important :)
3. You seem to be able to handle yourself fine :]
4. Maybe adding powerups and a constant increase of difficulty (asteroid speed, quantity),.. ?
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: Asteroids - My First Proper Game!

Post by Ginto8 »

I've just gotta say... great job. It looks really cool, and I like the way you presented the different steps in the process. I wouldn't say it's the best there is, but you're definitely well on your way to doing some impressive stuff, if I do say so myself ;)
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
EdBoon
Chaos Rift Junior
Chaos Rift Junior
Posts: 258
Joined: Fri May 28, 2010 10:44 pm
Current Project: Top down multiplayer shooter using unity 3D
Favorite Gaming Platforms: 360, SNES, ps1
Programming Language of Choice: C++, C#
Location: Atlanta, GA
Contact:

Re: Asteroids - My First Proper Game!

Post by EdBoon »

Hey great job! Looks like you have the basics down. for a weeks worth of work thats damn good.
If you are looking for things you could do add to the gameplay, maybe powerups like was mentioned before and also maybe have the bigger asteroids break into smaller pieces when you hit them first. Other things just for learning purposes you could add UFOs that seek the player or a dynamic background with stars and stuff. It really depends on how far you want it to go. Also could add sound fx (not sure if you have already done that).

Or you could close the project and leave as is, looks fine

Anyways, welcome, good stuff, also sub'd
Undead Empire -> http://bit.ly/dYdu3z
Gamerscore Tracker -> http://bit.ly/vI4T4X
Undead Empire: Hellfire -> http://bit.ly/1AgC4ZY
facebook.com/BigRookGames twitter.com/BigRookGames
youtube.com/user/bigrookdigital
TLcipher
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 5
Joined: Sat Jan 29, 2011 7:45 pm

Re: Asteroids - My First Proper Game!

Post by TLcipher »

Thanks for all the feedback!

I think I'll just play around with the code for a bit... Backgrounds would be good (tried to do them before but couldn't quite get the OpenGL blending right) and maybe some physics like transfer of angular momentum in collisions....

Thanks again for the suggestions guys :)
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: Asteroids - My First Proper Game!

Post by GroundUpEngine »

Great stuff! Props on multiplatform aswell ;)
User avatar
THe Floating Brain
Chaos Rift Junior
Chaos Rift Junior
Posts: 284
Joined: Tue Dec 28, 2010 7:22 pm
Current Project: RTS possible Third Person shooter engine.
Favorite Gaming Platforms: PC, Wii, Xbox 360, GAME CUBE!!!!!!!!!!!!!!!!!!!!!!
Programming Language of Choice: C/C++, Python 3, C#
Location: U.S

Re: Asteroids - My First Proper Game!

Post by THe Floating Brain »

Very Nice Work!!!
btw beat your high score :-D
"Why did we say we were going to say we were going to change the world tomorrow yesterday? Maybe you can." - Myself

ImageImage
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: Asteroids - My First Proper Game!

Post by N64vSNES »

Good work. I think other than having rocks multiply, It's just as good as the original and better ;)
TLcipher
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 5
Joined: Sat Jan 29, 2011 7:45 pm

Re: Asteroids - My First Proper Game!

Post by TLcipher »

Thanks for the feedback :D

Just ran it on my other machine and all the textures showed up white (meaning they were invalid). After a bit of Googling and editing in paint, I realised the problem was OpenGL couldn't handle the non power of 2 textures...

Updated the ATI drivers and everything works fine. That's strange, since I thought OpenGL "outgrew" that a while ago. I blame ATI.

I suppose I should've used power-of-2 textures from the start. That way it could run on really ancient cards as well....

I'll keep it mind for future projects ;)
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Asteroids - My First Proper Game!

Post by eatcomics »

TLcipher wrote:Thanks for the feedback :D

Just ran it on my other machine and all the textures showed up white (meaning they were invalid). After a bit of Googling and editing in paint, I realised the problem was OpenGL couldn't handle the non power of 2 textures...

Updated the ATI drivers and everything works fine. That's strange, since I thought OpenGL "outgrew" that a while ago. I blame ATI.

I suppose I should've used power-of-2 textures from the start. That way it could run on really ancient cards as well....

I'll keep it mind for future projects ;)
Yeah I think someone had this problem and posted here about that recently.
Image
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: Asteroids - My First Proper Game!

Post by GroundUpEngine »

eatcomics wrote:
TLcipher wrote:Thanks for the feedback :D

Just ran it on my other machine and all the textures showed up white (meaning they were invalid). After a bit of Googling and editing in paint, I realised the problem was OpenGL couldn't handle the non power of 2 textures...

Updated the ATI drivers and everything works fine. That's strange, since I thought OpenGL "outgrew" that a while ago. I blame ATI.

I suppose I should've used power-of-2 textures from the start. That way it could run on really ancient cards as well....

I'll keep it mind for future projects ;)
Yeah I think someone had this problem and posted here about that recently.
+1
Post Reply