In the notes for Cannon III I said that I would take a look at using an Xbox 360 controller instead of the mouse… This kind of broke the quick movements necessary to play the game so Cannon Zero is mouse-only.
Cannon III is complete. Just as Cannon II borrowed a lot from Cannon I, this game reuses code from Cannon II except now we’re using the XNA framework. The assets file provided by 3D Buzz contained some enhanced graphics labelled XNA, so I used those instead of the boring default sprites.
Here’s a video of Cannon III in action:
That wraps up XNA Xtreme 101 Volume 1. Before I move on to Volume 2, I’m going to make my own final version of the Cannon game. Probably with new graphics, sound support, and Xbox 360 gamepad support. I’d also like to fix the issue with CheckFire() being called too quickly – which is causing the projectile to be fired on BeginGame() and ResetTarget().
Cannon II is done now. It’s pretty much Cannon I, except using a (mostly) proper game loop and custom classes.
For fun I’ve changed the graphics and added sound effects using SoundPlayer from System.Media. I used a tool called sfxr to randomly create the sounds:
The graphical changes are the very worst in programmer art, but what the hell… Here it is in action:
Also, while I was looking for something else, I came across this tool for generating animated explosion sprites: Explosion Generator. Might be useful later.
For the second game project in 3D BuzzXNA Xtreme 101 we’re writing a simple target-shooting game called Cannon. From a single initial design, the game will be implemented three times. First as a basic WinForms application, then as a more complex one with custom objects, and finally as an XNA framework game.
The mechanics of the first implementation are complete, with the rest of the gameplay to come in the next lesson.
The objects in Cannon I are PictureBoxes loaded up with some simple graphics supplied by 3D Buzz. Here is the player ship firing on the moving target: