Christian's profileChristians' XNA Gaming D...PhotosBlogLists Tools Help

Christians' XNA Gaming Den

This is where I`ll share my experience building some XNA sample Games.

Christian Beauclair

Occupation
Location
Interests
May 16

My Tank Game – An exploration of XNA 3.0

I’ve decide to create my first sample game using XNA 3.0. My goal is to use the currently existing samples from the Creators club and some that are shared by the community. This should be a lot of fun.

I will use Softimage 7.5 Pro Mod Tool (free) from Autodesk to take care of the models. You can find a link to the tool from the partner page of Creators Club or go directly to their site.

 

My starting point is the TankOnHeightMap sample. This sample illustrates the basic concept of how to detect collision from a 3D object to a Height Map and is already built from two other samples. The first of these is how to load a height map from the pipeline instead then from code. The second one is on how to create simple animation from a 3D model by rotating some of it’s component. When I ran the sample the first time, the idea of a cool tank battle game was obvious. So I went ahead an loaded the model in Mod Tool by importing it using the Crosswalk FBX importer. At this point I did not use the XNA integration yet. Maybe later for other models :-)

So what was my first step. I figured I should throw in a few more animations. Certainly turning the turret and the canon using the right thumb stick were obvious one. This did not take long. Using the Simple Animation code I was able to extend the tank class and wire it to the controller. Done but not completed. At this point I am not clamping the movement yet. I am trying to get a feel for the game first. Second thing that came to mind was to get these nice two exhaust pipes to belch smoke. The 3D particle system had everything I needed. Once brought in my project I just created two particle emitters position and instances (right and left) and added these to the tank class. I then made sure that every time the tank moved their offset position was recalculated. It looks mighty cool.

Looking at the camera that follows the tank did not impress me. I want to now bring in a chase camera (yes there is a sample) that gives me a more natural feel and sometime shows me the front of the tank. I want these front wheels to turn. I also need to get the wheels to emit dirt as the tank moves. In this series of post I plan to give you more details of the progress and share my code as I go along.

This first pass was done over a couple nights and I did hit a couple snags. I can tell you that the forums on creators club have all the answers so far :-)