This is what the XNA game i’m working on looks like.
It’s a single player top down tanks game.
Currently I am working on making the tank move correctly.
The way it should move is that it’s given a direction, from the arrow keys, then it should rotate to that direction before starting to move.
The difficult thing about that is that it shouldn’t have a front or a back, like if i press up, it will move upwards, and if i press down, it will move down, but if i press left, it will rotate 90 degree and then move left.
I have been trying to make this game a few times before, but this tank rotation thingy is always the thing messing with my head, I am really counting on figuring it out this time though :)
One of the other things i’m trying to figure out, is how to mix 2D and 3D.
The dots between the two tanks on the image is the tracks from the green tank. Beside not being rotated correctly, they are on top of everything else.
Currently i’m thinking about placing a quad / plane in the 3D world, and then draw the texture on that instead. A quad / plane is a rectangle with no dimensions, as i only need one side, the one on which to draw the texture.
If there is one thing i find annoying and confusing in XNA / game development, it’s the different units and ways of expressing angles etc. Spent a good deal of time yeaterday trying to work out the tank rotation, only to find out in the end that the angle which i was using was not 0-360, instead it was -180 to 180 - much like radians. At that point i had deleted all the code since it wasn’t working…. But maybe it was?
Damn angles.
Next is collision detection, bullets, better lighting, explosions etc.