FPS example + Tokamak ragdoll

Blitz3D Forums/Blitz3D Programming/FPS example + Tokamak ragdoll

Vorderman(Posted 2006) [#1]
On another thread someone asked about a FPS player example that can cope with slopes, jumping etc...

I had this code laying around and I'm not going to use it, so it might as well be available. Originally it was to test a Tokamak ragdoll enemy.

You can move with A S W D, jump with space, shoot with the left mouse, hold the right mouse to fire the grappling hook (a red blob!), then keep holding to pull yourself towards it, and release the right mouse when you want to catapult yourself upwards / downwards / sideways etc...

Pressing RETURN will release the Tokamak ragdoll who is right at the top of the tower - he will then tumble all the way down to the ground.

Hope someone finds this useful.
Download is 1.12mb, includes source code and Tokamak DLL. (NOTE - sfx and weapon models etc.. are not mine and shouldn't be used commerically etc...)
http://www.jameskett.dsl.pipex.com/Tokamak_Ragdoll.zip

Screenshots :





puki(Posted 2006) [#2]
Looks interesting - nice one "Carol".


jfk EO-11110(Posted 2006) [#3]
Thanks a lot, surely useful. Tho not sure if I'll add this to the player, but a lot of people ask me to add real physics to the levels items. Well this may be a good starting point.


Vorderman(Posted 2006) [#4]
Two people have now posted to say how much overkill it is to use 'real' physics - presumably neither of you have actually looked at the code - it uses Tokamak for the ragdoll, but the player is handled entirely with Blitz's collision system. Discard the Tokamak ragdoll and you have a Blitz-controlled character walking, jumping, sliding etc..


Ross C(Posted 2006) [#5]
Sorry for posting that :o) I didn't read the whole thing. Apologies.


Mikele(Posted 2006) [#6]
Very, very useful. Thanks!!!


jhocking(Posted 2006) [#7]
I already have the tower with ragdoll (btw, thanks for making that!) so I'm wondering if this has anything else in it I might want to check out. Specifically, can you affect the ragdoll by shooting it? I haven't messed with ragdolls yet, so I'd like to see some sample code for doing that.


Vorderman(Posted 2006) [#8]
Should be easy enough, the bullets are already detecting an impact point on the tower so it should be easy to modify it to detect an impact on one of the limb objects that make up the ragdoll. Then work out the direction of impact (the bullet's direction would give you that) and apply a Tokamak impulse in that direction.


Happy Sammy(Posted 2006) [#9]
If jfk add tokamak to CSP game engine, I think it will become a Halflife2-liked engine!!!

Sammy
:)