LP2-1OTVMinerProgress

=OTV Miner Progress =

=Overview =

1.1. The goals of the second project are as follows.

**Project 2 **  1.1.1. To complete these goals I used code from XNA Game Studio Creators Gide (S. Cawood & P. McGee) and A Simple Introduction to Game Programming With C# and XNA 3.1 (C. Bennett). Between these two resources I was able to get the goals completed for this part of the project. I was much more successful in getting the things I wanted to do in this project verses the last project I turned in.
 * Ship Animation
 * Boundary Detection
 * Background Motion

1.1.2. I did most of my preliminary coding testing how I was going to accomplish the goals I set forth. I started out with the movement portion and researched a lot of scrolling background examples. I found these examples to give me the desired movement I wanted, but it wasn’t working how I thought it should. I got the background to move up and right and left. When you transitioned the screen made an obvious pause as it switched orientation. I didn’t like the look or feel of how this worked. I decided to scrap this direction and come up with a different method. A long drive to Atlanta gave me the time to devote to a new concept.

1.1.3. I choose to use a grid layout instead of scrolling. I created a class that makes a square grid (my initial test is a 3x3 although I tested a 5x5). By setting some constants the ship transitions between quadrants when it reaches a portion of the screen edge. For example in the 3x3 grid, the ship starts in quadrant 5 (which is the middle area). When you move up, you go to the top of the screen and once the ship is out of the screen view, it is redrawn at the bottom of the screen and the quadrant changes to 2. If you continue to travel on your current trajectory when you hit the top of the screen, the program prevents you from going any further.

1.1.4. The quadrant idea worked out very well. The next step I took was modifying the rocks and elements to the quadrant scheme. I added a quadrant variable to each class and used the value when I iterated through the list objects. I ignored any item that was not in the current quadrant. This solved several problems I was having in how to track all of the asteroids in the game. If I used the motion I could only track what came down from the top. Now the ship moves all around and I can have different things in every quadrant.

1.1.5. I looked at sprite animation next. I saw an early example of animation from Microsoft which used some obscure graphic format. I had a hard time with this animation class. I found another from the Bennett book which had a great class already made. I used this class in my project and it worked out really well. This was a definite life saver in the time I saved from trying to use the other class I had.

1.1.6. The next part of the project I took each class I had in my first project and tried to refine them. I came across the need for a pause feature in the first project and was hoping for a built in functionality in XNA. To my dismay there is no such option. So I built in a pause option in the game so I can stop play (mainly for print screens). I also decided to use some type of entry screen. So I display text when the game starts waiting for the user to hit the F5 button. When it is pressed the game starts for the user. I also refined the end of game. On the previous version you could still move and fire the laser from the ship. I now look to see if the ship is active before any operations are performed to the ship.

1.1.7. Lastly, I added sounds to some of the actions. When you fire the laser, destroy an asteroid, or collect an element a sound is produced. I tried to make a sound for ship movement. However I haven’t found a sound I am happy with. I hope to have this resolved in the final version. I started tracking the consumption of resources as well. Right now it is just displayed and there in now repercussions if you run out. When I first enabled it I used up all of my fuel before I left the first quadrant. So I had to make an adjustment to how the fuel is tracked.

1.1.8. The only goal I didn’t complete like I thought I would was the boundary detection. I envisioned an impenetrable rock field that would be displayed. Using the quadrant concept I have a boundary sort of speak, so I feel I met the objective even though it’s not what I envisioned.

Project Home Next Section