Greetings once again all!
I'm throwing up this post mostly as a place holder for the final version of the Asteroids clone. I figure we're so close to deadline, I'll just make one post with the final version of the code once it's completed. (Or, more precisely, when time expires). It's going to be close on this project.
That being said, I'll toss up what has been added since the last update. I've corrected the rotational issues for the most part, added bullets that can be fired at the Asteroids, and started in with adding the actual Asteroids themselves. I've got to say, getting the collision detection working correctly was quite difficult, but I was able to finally pull it off. So, with that, we have the big Asteroids that get struck by a bullet, and now break into two 'medium' Asteroids. About the only game play issues left to address are to add another layer for when the 'medium' Asteroids breaks into two 'small' Asteroids, the player scoring routine, the ability to enter your initials if you get a high score, collision detection for when the ship is struck by an asteroid, and a display for the number of ships you have left. I will also *probably* add an instructions screen since that is something we have been missing from the last couple of game projects.
I've also added the ability to make the game fullscreen (F1), and a global DebugMode Boolean (F2) which will show various amounts of information for catching errors and bugs. (I had to for this project due to the complexities of managing the sprite arrays and their locations). The debug mode looks kind of cool as it shows the current positions of each sprite, just off to the side of each sprite. As the ship, or a bullet, travels across the screen it's neat watching all the stuff going on in the background, as well as quite colorful.
As a last note, I want to add that most Asteroids games include a friction variable in the physics calculations to slow the ship down as it wanders around the screen. Initially I did not include this, and I still haven't at this point. I realized that in space, you have zero, or near zero, friction to slow you down once you start moving so it seemed a little off to include that. However, I would like to hear your input. Adding it in is only a matter of a few lines of code so I guess the question is do we want to mimic others game play, or to keep it realistic. I'm thinking most people added the friction to improve the game play, but I'm finding it just as fun without it. Perhaps I'll just add an option that allows the user to turn friction on and off. I suppose to be ultra-realistic, when adding the friction, it would mostly be seen as the user tries to adjust his trajectory in the exact opposite direction. (IE: to turn the ship around you would have to counter the current velocity until it reached zero and then apply thrust to move in the opposing direction). Any thoughts or ideas are appreciated, I'll do my best to get them incorporated before the end.
Well, that's all I have for you all at the moment. Back to coding!
"May the mercy of His Divine Shadow fall upon you." - Stanley H. Tweedle, Security Guard class IV, The League of 20,000 planets