Jump to content
  • Advertisement
Sign in to follow this  
XiGency

Asteroids 3D Game

This topic is 4421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is my first ever 3D game. I programmed it over the weekend in C++ and it uses OpenGl and GLFW. It uses simple 3D shapes and particles. In the future I plan to add Sound, Music, Online High Score, Online Multiplayer, and I ultimately plan to port it to PSP with the PSPSDK from ps2dev.org. Screenshots: Photobucket - Video and Image HostingPhotobucket - Video and Image Hosting Download: Old Asteroids.zip New Download [Edited by - XiGency on June 12, 2006 5:05:08 PM]

Share this post


Link to post
Share on other sites
Advertisement
Nice job dude! I had fun with it.

How are you doing collision detection? Are you thinking about releasing the source?

Share this post


Link to post
Share on other sites
Thanks :). I just used the distance formula in math, so: sqrt( (x1-x2)^2 + (y1-y2)^2 ). Sure I'll release the source, it's actually really simple, only about 1,000 lines. I might have to clean it up a little bit, but I'll include it in the next release.

Share this post


Link to post
Share on other sites
Thanks, I'm looking through it.

Suggestions:
1) not use glaux, I can't compile on code::blocks with mingw
2) usually functions aren't defined in header files, this works because you have one cpp file
3) use true/false over TRUE/FALSE
4) maybe not use messagebox's to make the code more cross platform
5) your code reminds me of LaMothe's asteroid game, have you seen that code?

Cheers

Share this post


Link to post
Share on other sites
No I haven't seen LaMothe's Asteroids code. I don't think it actually requires glaux, but this is my first OpenGL app, and I don't really know what glaux does :). The reason the code is in header files instead of cpp files is because I'm using vc++ 05 and it compiles any cpp files externally, so I thought it would be easier to call them headers. The only capitalized trues and falses are in code that I've taken from other examples.

[Edited by - XiGency on June 9, 2006 10:14:19 PM]

Share this post


Link to post
Share on other sites
Ok, got it to compile.

* comment out <gl/glaux.h>
* include <windows.h>
* change TRUE to true
* make sure to link with glfwdll and not the static version

Wow, did you say VC++ 5. Retro dude! Never heard about the header thing.

Share this post


Link to post
Share on other sites
VC++ Express 2005 :).

For the game, I wanted to organize it by keeping the source in multiple files. But I had to call them headers because VC++ doesn't use makefiles, so you don't actually specify what to build, it just builds all the C and CPP files in your project. I've been trying to find a way around it, because I don't want to have to make headers for them to specify extern functions, since that seems a bit overcomplicated for a little game.

And I fixed all of the other problems, I'll upload it with the source once I add something new.

Share this post


Link to post
Share on other sites
All right, I did a lot of work on the graphics, and added stars, Earth, the moon, and venus to the background. I also added [fake] shadows and outlines around the asteroids to make them easy to see against the background. I put the download link in the first post, along with a screenshot.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!