Hello. Right now I am currently working on making the tank fire, but the problem is that the rotation matrix for the missile does not take the tanks current rotation into perspective. So I have to find a way to fix this, as this is causing the missiles to fire upwards. They do go in the right direction that I would like. Also I have downloaded a new tank model and I am currently working on implementing it.
Hopefully though I will have the enemies working so they start to move toward the tank. Then I just have to set up some collision detection and scoring system and then thats all the gameplay I wanted to add. Although I might add more.
I still have to create a model that has a decent grass texture on it as the one I have right now Is incredibly boring. Anyway I need to get back to work.
Monday, 28 September 2009
Sunday, 27 September 2009
Camera working!
Ok guys so I haven't being doing much game programming lately. I have been busy building up my website.
Although tonight I have managed to get my camera working. I did this by using matrices. Firstly I created a camera rotation matrix using the following lines
Matrix rotationMatrix;
Matrix.CreateRotationY(MathHelper.ToRadians(cameraYaw), out rotationMatrix);
as you can see I first initialize the matrix using Matrix rotationMatrix then I go onto create a value for how much I would like to rotate. cameraYaw is a const variable set to 2.0f.
and using input I then determine whether or not I would like to set this rotation matrix into effect.
Like so...
if (keyboardstate.IsKeyDown(Keys.D))
{
cameraYaw -= spinRate;
}
So thats all working. Now I am going to work to make it so that the camera goes in the direction of the target. Hopefully that shouldn't be to hard.
Anyway once I get that up and running I will definitely get some missiles firing. I have decided that since this is my first 3D game I am not going to go into to much detail and just get the thing finished. For instance I was going to split the tank model into 2 models so that I could rotate the top of the tank like a turret on a real tank would but that would be too much work. And I am probably going to change the model again as I am not quite happy with it. Anyway right now the missiles will only fire towards whichever direction the tank is facing.
After getting this set up I will find a way to make the terrain solid. And set up some collision boxes around the tank and the terrain. Having done this I will find a way to add gravity to my game to make sure that my tank is constantly on the ground :D
Anyway back to work!
Although tonight I have managed to get my camera working. I did this by using matrices. Firstly I created a camera rotation matrix using the following lines
Matrix rotationMatrix;
Matrix.CreateRotationY(MathHelper.ToRadians(cameraYaw), out rotationMatrix);
as you can see I first initialize the matrix using Matrix rotationMatrix then I go onto create a value for how much I would like to rotate. cameraYaw is a const variable set to 2.0f.
and using input I then determine whether or not I would like to set this rotation matrix into effect.
Like so...
if (keyboardstate.IsKeyDown(Keys.D))
{
cameraYaw -= spinRate;
}
So thats all working. Now I am going to work to make it so that the camera goes in the direction of the target. Hopefully that shouldn't be to hard.
Anyway once I get that up and running I will definitely get some missiles firing. I have decided that since this is my first 3D game I am not going to go into to much detail and just get the thing finished. For instance I was going to split the tank model into 2 models so that I could rotate the top of the tank like a turret on a real tank would but that would be too much work. And I am probably going to change the model again as I am not quite happy with it. Anyway right now the missiles will only fire towards whichever direction the tank is facing.
After getting this set up I will find a way to make the terrain solid. And set up some collision boxes around the tank and the terrain. Having done this I will find a way to add gravity to my game to make sure that my tank is constantly on the ground :D
Anyway back to work!
progress?
So guys recently I have been working a lot on my new website. Putting most of my efforts into it. Right now I am writing some articles for it that will hopefully bring a few more people to the site.
On the programming side of life, I have blitzed through all the tasks my computer teacher gave us in class. I am his favorite programming student :D. So I am learning something after all :D.
Anyway right now I am going to work my way through the new book that came.
Microsoft XNA game studio 3.0 unleashed. And by the end of it I will have a cool 3D game. Learning how to do a couple of things on my way that will eventually lead me to creating my own game.
Please remember to check out my new site and sign up for the forums! :D
http://www.gamercity.co.uk and if you like what I am doing with the site please tell me in the forums :D
Monday, 21 September 2009
Study time
Hi
I cannot really do much work today as I really need to study for my computing and chemistry test that I have coming tomorrow and the next day. So all the things I have lined up for today will have to wait. I am just going to try and add a skybox then probably call it a night. anyway more info tomorrow as well as a small update on how my debut at training has gone at the new club I am going to! :D
Bye for now!
Sunday, 20 September 2009
Enter the Matrix..
Hi guys so I have just found out that to fix my model I need to create a matrix for it which is similar to that in the Chase camera sample from the XNA website
So I need to figure out how I would port that to my engine. I am happy though as I managed to fix the problem
that the models center was not where I wanted it to be. Although hopefully when I get back from school I can
quickly find someway to create a matrix for my model. After that I am going to force myself to create a skybox because
the background looks a little dull. I might also texture the flat terrain model I have with something that resembles
grass. And also find a way to texture the tank that I have downloaded.
So my list of tasks for today is as follows:
texture ground
create skybox
create matrix for tank model
texture tank model.
research how to make solid ground
- this should be easy as I think I know what I am doing here. Just a quick bit of collision detection and
if this returns true then I will simply move the models position up a bit.
anyway time to get ready for school.
Yet another update :D

Hi guys Just thought I would show of a picture of my current game engine. As you can see its still very primitive but that will hopefully change soon. There is a small bug with the drawing of the tank that I need to correct but other than that its coming along pretty nicely(although a bit slow) But since this is my first proper 3D game I am just thinking that any progress is good progress. Hopefully tonight I will be able to fix the object center point bug and I will get some cubes attacking you and some missiles firing from the tank. After that is done I will probably change the terrain to something that resembles grass. Its going to be flat though but to make it more interesting I might add some bill-boarded trees. The skybox as you can see is not up and running yet. I have been too busy helping my dad dig up the garden. All in all I have gotten less than I would have liked to this weekend.
Anyway time to go Cya later!
Small update
I have just joined technorati to try and get a few more people to my blog. I will keep you updated as to whether or not this is any good. Hopefully it will be :D
Anyway I am having a tough time figuring out how to make it so that the model goes in the right direction. Hopefully I will find something good and useful in the sample I just downloaded from XNA. I am actually astounded that XNA have such high quality samples which allows a lot of beginners the ability to dive straight into game programming. It has lots of samples ranging from animation to networking and beyond! I should have the basic gameplay mechanics up and running soon though :D
Stay tuned!
Subscribe to:
Posts (Atom)