Asteroids 3D Game
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:
Download:
Old Asteroids.zip
New Download
[Edited by - XiGency on June 12, 2006 5:05:08 PM]
Nice job dude! I had fun with it.
How are you doing collision detection? Are you thinking about releasing the source?
How are you doing collision detection? Are you thinking about releasing the source?
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.
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
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
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]
[Edited by - XiGency on June 9, 2006 10:14:19 PM]
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.
* 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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement