Troll Controller

posted in noaktree leaves
Published August 19, 2005
Advertisement
What a game...

After I got back from my vacation I played a game. I mean I really played this game. It's been so long since I've actually enjoyed playing. But this game was just so awesome that I couldn't stop. With most games I usually end up walking around trying to figure out how elements of the game were designed and this game was no exception. The difference is that the gameplay was so fun I found myself forgetting about design and became immersed in battle. I must make a similar game. I simply must. Don't try to stop me.

For starters...

I hooked up an XBox controller to my PC for starts. I then wrote a joystick manager which enumerates, polls, and returns state data. I then had to figure out how to control my character with the analog stick in an environment where the camera can be from any angle and moving. After a bit of thought It occurred to me that the left analog stick creates a nice 2D vector which I then normalize. I then convert the vector to radians using the arc cosine of the dot product of the up vector and the stick vector plus some other nonsense. Then, and here is the real important part for a rotating camera, I add in the Y rotation of the current scene camera to the stick angle. The angle is clamped to a value between 0...2*pi which gives me good control over the character's rotation. Pushing down on the stick brings the character towards the camera and up moves it away. Given a camera which tracks the characters position - left or right on the stick would cause the character to run circles around said camera. Just like in the game.

After this I needed to smooth the turning movement and did so using a linear rotation interpolation between the new angle and the current angle. I've added rotation speed variations depending on the distance between the two angles. I put in four animations: Idle, sneak, walk, and run, all controlled by the stick. Just like in the game. Next I'll need to add jump and jump-flip and then probably a back flip for good measure.

I've already modeled and light mapped a test level with reflective floors, etc. But you'll see that once all character controls are implemented. I'm not going to say what game it is that I played but if I can make the gameplay similar to it then you should have no problem recognizing it. I'm also sure I've figured out how the camera system works and have begun writing structures for triggers, paths, etc which will all be configured using XML.

Flash movie...

And if you read this far then you might want to have a look at the flash movie I made of the troll (with a specular bump map - made and applied in seconds using my material editor) hooked up to the character controller. The controls are all based on time and so it can get a bit jerky when the frame rate goes under 25 which it does when using fraps. Oh well at least you can see how the controls work. The flash movie is 4mb.

Previous Entry Tiny XML
0 likes 4 comments

Comments

jollyjeffers
Quote:I must make a similar game. I simply must. Don’t try to stop me.

Why on earth would we ever want to stop you? [lol]

Quote:I’m not going to say what game it is that I played but if I can make the gameplay similar to it then you should have no problem recognizing it.

oooh, the suspense. I want to know NOW, not later. [headshake]

That movie is taking ages to transfer though... 10mins and it's about half way [oh]

Will check it out when its done though [grin]

Jack
August 19, 2005 10:38 AM
JTippetts
You, sir, are friggin awesome.

BTW, you'll need to tell me what game it is since the odds are extremely good (approaching unity, as a matter of fact) that I have never played it if it is an XBox or PS2 game.
August 19, 2005 08:43 PM
Rob Loach
Excellent! Now to have it use the washroom, eat, sleep and watch TV.
August 19, 2005 09:14 PM
noaktree
Quote:oooh, the suspense. I want to know NOW, not later.
Soon. I feel the need to be mysterious for some reason.
Quote:You, sir, are friggin awesome.
BTW, you'll need to tell me what game it is since the odds are extremely good (approaching unity, as a matter of fact) that I have never played it if it is an XBox or PS2 game.
Thanks! It'll become apparent very soon. No XBox or PS2? Strictly PC then?

Quote:Excellent! Now to have it use the washroom, eat, sleep and watch TV.
[lol][lol][lol][lol][lol]
August 20, 2005 03:56 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement