Game Development Community

Platform Ropes

by Le Roi · in Torque Game Builder · 06/20/2006 (8:00 am) · 3 replies

Hi

How would I go about doing ropes for a platform game , my idea is the following :

player jumps towards rope

As soon as player collides with rope , player is mounted to rope (and rope starts swinging - physics ?)

Then when the player presses jump , player is unmounted from the rope and his momentum is transferred from the rope to propel him in the direction that he jumped ?

Is this possible with the current physics models ?

Thanks

#1
06/20/2006 (8:14 am)
Yes, it is. But I don't know if it is possible in the way you want it to be.

People often want to make things more confusing than it is when they read about advanced physics and such. Basically, you need three things: a mount-point on the rope, pre-generated rope animations, and variable speed (if you want the player to be in control of the swing; otherwise this is not necessary--think Pitfall or Jungle Hunt). Oh, and a way to jump onto and jump off of the rope, but if you have a jump feature already, you just need to find a way to automount if they touch the rope. Have animation states for the rope, kind of like some of the old-school platformers on systems that didn't have nifty physics. (moving up and down the rope might be tricky) Then use your default jumps to get you on and off the rope. If it is in a far swing, your jump will carry you further.

While it is cheesy, and perhaps considered cheating in today's "let's make chain physics work" world, it is still an old-school simple solution. You just need to make sure that your platforms are aligned correctly and that your jump and mounting is consistent for all frames of the rope's animation.
#2
06/20/2006 (6:20 pm)
Can you move a mount-point programmatically? I'd think that would be the easy way to handle climbing up/down the rope and mounting/unmounting from the right place if you can.

On collision, move the mount point to the right place and mount the player onto the rope. On move up/down shift the mount point up/down the rope. On left/right, apply force to the rope in the appropriate direction so the player can swing further or stop swinging.
#3
06/22/2006 (10:31 am)
You can move a link point through script :)