Making Some Progress

My place of work is closed today due to the weather. Only a slight surprise there given the storm - we received around 16" of snow. Even in Wisconsin, that's considerable.

I'm working on some game programming today. The demo app that is created in Aaron Reed's book Learning XNA 4.0 is complete. This was a good exercise for being introduced to the framework. I've learned a lot: collision detection, sprite generation, simple AI, and generally how the different basic parts of XNA work together.

I finally found a codec that works much better for capturing game video. Here's a video of the progress:



Each enemy sprite is spawned from a random corner of the play window. They are spawned at regular, though random intervals that decrease as the game progresses - more sprites are on the screen at once. You can see the simple animations of the individual sprites.

"Power-up" sprites are the skullball, bolt, and plus sign sprites. The skull slows the player down to half speed, the bolt speeds them up to 2x their current speed, and the plus doubles the player size. These are all cumulative.

Collision detection is simply a rectangular hit box. The size of that hit box is adjusted when the player is enlarged by the plus power-up. A score is totaled based on the number of sprites that do not collide with the player and are allowed to pass out of the game window. Certain sprites are worth more points based on their type and speed.

These are all incredibly simple and basic bits of coding, but it's an entirely new experience to me and it was very helpful to go through this exercise.

No comments:

Post a Comment