Ok the final update is uploading at this moment. While it is finishing, I wanted to get out my thoughts on the project, namely, what went right, and what went not-so-right.
So, first of all, going by the guidelines we set out at the beginning I'd have to say we've done pretty well. I was able to get all the basics in there…. that is, all the brick types we talked about along with all the power up items, and some cool animations to boot. Towards the end, I added a title screen, and a credit screen. The high score screen was something that did not get done, although I don't feel too bad about that since it was an add on later in the project. When I suggested adding the high scores screen, it was in the hopes of creating a 'complete' game. Even though this one thing did not get completed, I still feel that the game is complete, in the sense that it does have game play, keeps track of your score, allows you to 'lose' if you run out of balls, and allows you to 'win' if you complete 10 levels. The high score screen would have been a nice added feature, but added feature is the key word. I was also able to get in RB's suggestion of making the brick pieces fade out over time as they fall, and that looks quite nice. Additionally, to break up the monotony of the pieces, I added a small command that rotates each brick piece sprite by a random amount so things are a little more diversified as far as how those animations look. Also, I added graphics to the top left of the game play screen to show how many balls you have left. A sound track and sound effects have been added, which adds a new level of depth to the game. The credit screen lists all the resources used and who created them. I added mouse support and keyboard support to the title screen.
Now, on to the bad things. There are some bugs. Namely I've noticed issues with the way the level manager (or perhaps the ball class?) keeps track of the number of bricks left to break before moving on to the next level. Sometimes, depending on the brick types, it will move on to the next level while there are still a few bricks left that aren't indestructible. Not a huge issue, but irritating none the less. Also, once you move onto the later levels, sometimes bricks show up as an 'explosive' type when they are really the type that drop the disappearing ball power up. This was something that popped up very late in the coding (when I added multiple levels), so I really haven't had a chance to look for the cause. On the title screen, the mouse will allow you to select an option by clicking it. However, to launch the selected option, you have to hold the mouse button down while hovering over the selection. I was trying to set it up for standard windows actions, click to select, and double click to launch. However with the way I coded things, it turns out that instead of a double click, you can activate the option as mentioned above. This is something that should be fixed as well. Well, those are the major ones I've noticed. Since we had basically zero time for a beta testing stage, I'd appreciate any feedback you might have on other issues you notice.
As to the actual code itself: I think most of it is good, except for the few instances where things aren't going quite as expected. Still, there is nothing that causes the program to crash or terminate unexpectedly, at least not that I have come across at this point. There were a couple times while coding that I realized a few changes would make things much better. First was the change from passing all the XNAObjects to each function that needed them to creating a wrapper class for all the objects so any function/class can use and access them in a standard manner. This change ended up working wonderfully after I got it added, but there are still a few places where code needs to be updated to this method. Secondly, it would have been very useful to do the same with the game objects themselves. There are a lot of calls where a function needs to create a copy of the brick array, or the ball, or even the paddle. It would have been good to create a wrapper class for this purpose as well, so anything could access all the game objects something like: GameObjects.Ball or GameObjects.Paddle, instead of having to pass objects in the function arguments. I started to add this functionality in but realized our time limitations quickly. At any rate, its something that will be good to keep in mind for later projects.
And lastly, I think a lot of the base objects can and should be reused in future coding. There are still some minor issues with the rotation I've noticed in the base sprite class, but since that was not used in the project, I haven't had the opportunity to fix things. Don't get me wrong, the rotation actually works, but what I've seen is that when rotating, the point of origin (or perhaps the location of the sprite) seems to drift when used with a trajectory. Additionally, the rotation (when using the rotate_CW and rotate_CCW calls), is a little slow. That's not so much an error as much as it could be implemented a bit better. Namely, I tied the rotation speed to the system gametime, and while this is fine, it would have been better to allow the programmer to send in a rotational speed via an argument or class property.
So all in all, I think we hit the mark, but I'm going to wait for some feedback from Mr. Whitaker to see what he thinks. While there are a few errors this was, after all, a learning experience, and in that sense I think it served its purpose very well. Going into the future we can build on this, and I think, end up with a set of classes that will make 2D game development fairly quick and easy.
The link for downloading the final version of the code for this project is below. If you download and play with it some you may need to turn off the robot player - I kept it enabled while testing the levels, and although I meant to turn it off before the upload, I forgot. To turn off the robot player, locate the robot_player boolean in the paddle class and set it to false. Also, there is no video of the latest work in progress, for some reason my computer seems to have a microphone/sound input issue and will not record the audio that comes with the game, and this adds a lot to the game, so you just have to compile it yourself!
Let me know what you all think! Thank you!
Install and executable only: