Game Development Community

Ladders anyone?

by Badguy · in Torque Game Engine · 04/28/2002 (1:13 am) · 45 replies

Ok I need a Ladder.
what Ive got is simply use a bounding box via SceneObject,
set some properties for surface type settings.
save out the scale and rotations. thus simply allowing a wrap on anything to turn it climbable
certian surfaces can call certian animations or whatever.
I havent decided yet exactly what to do about the player.
Ill get there when I do :)

Im thinking so far flag him as climbing..
and handle it there. using the box.

or Better maybe to just use an ObjectType (LadderObjectType) and perform some case specific code in his end.(im trying this one first)

thoughts?
Page «Previous 1 2 3 Last »
#1
04/28/2002 (1:24 am)
I really don't have much to contribute but I did try something myself a while ago.

I had attempted ladders by detecting trigger entities named 'ladder' in the interior files (from WorldCraft). What I did was create a trigger from the dimensions of the brush and simply gave the player a climbing state which was activated when they entered a trigger.

I had some problems with network updating (as I had with swimming too) and getting off the ladder but the climbing worked decently.

Let us know if you make progress :)
#2
04/28/2002 (5:20 am)
Ok,
so what I have here is Added via the mission editor.

with the box it gives you can position it around the object you wish to climb
and voila instant ladder :)

for now im using player skill and control to keep you on the ladder ..
have caught it all up in player class handled like a trigger and a jump.

would be neat to see what youve done to lock the player in would be a good ladder option.

Ill post what ive done a little later after I get some sleep, ill clean it up more play with the if(mClimbing)
in player.

no troubles logging into a dedicated server and using it.

(its really great how I can run both at once now!)
#3
04/28/2002 (5:27 am)
Sounds great, badguy!! Keep up the good work, can't wait to try your doors and ladders! :-))
#4
08/24/2002 (2:23 pm)
Can you make the ladder a collideable object then when something like a player object hits it from the right side, apply an up or down impulse to the player based on which direction he is moving?
#5
10/08/2002 (2:45 am)
Badguy, do you mind posting your efforts? I'm trying to get ladders into Torque, too and I am wondering what the best solution would be...
Not sure if I should go the Map2Dif way or simply add some triggers in the mission editor...
your approach with adding a box in the mission editor sounds interesting...
#6
10/09/2002 (10:51 am)
yea I wouldn't waste the time with map2diff

with what I had goin it would be an ideal ladder...
(Object Wrapper Invisible type thing)


the forces and player control needs configuring ..
i'll pack up what I got ..
heh .. If I can find it :)
gimme some time.
#7
10/09/2002 (10:55 am)
cool, Badguy, lookin' forward to see your stuff... :)
#8
10/10/2002 (1:38 pm)
Just a thought...

How about setting it so that while a player is "colliding" with a "ladder" object their gravity is set to make them raise. Then you could also set it so that if they are currently colliding with a ladder and they try to back away their gravity is set to lower them slowly unless they are also colliding with any non-ladder/player object (the ground for instance) in which case they move as normal. It would take some tweaking but it could work.

Also it might be useful in RPG's to enable the climbing skill. Just flag any surface that should be climbable as a ladder. Then give all ladders a flag to indicate whether the "climb" skill must be active to use them. Then when a player who has the climb skill active collides with a surface flagged as a ladder his gravity changes and he begins climbing (up or down depending). The best part is that making the speed of the climbing dependent on the characters skill level would be a no-brainer.

Anyway, I don't know if it will really work, but I will give it a shot as time allows if someone else doesn't come up with something better first.
#9
10/16/2002 (4:32 am)
Ok .. I dug it out ..
so lemme add it to my project and play with it again ..
if I can buff it up a bit ill add it as a resource ..
unless you want me to mail you what I have thus far.
#10
10/17/2002 (8:15 am)
Badguy, would be cool if you could mail it, yes! :D
#11
10/17/2002 (12:15 pm)
Ok .. sent :)
#12
12/26/2002 (6:03 pm)
Hey all, could someone post the source that was mentioned in this thread (from BadGuy)

I too am trying to get ladders cooking.

Thanks!
#13
12/26/2002 (10:26 pm)
Would be great, if we could get this source...
#14
01/03/2003 (4:57 pm)
shrug its pretty incomplete ..
it needs player interaction still
this is just a start with a game registered object ready to handle it
the player class needs work to handle it.
I would prolly chose to activate a face on the object and traverse the player on that face using the 4 movement directions

But i've not been workin on this stuff I gave it to some other guy (not beffy) well him too but.
I dont know as if they ever did anything with it..
if you still want what is here I can prolly dig it up.
#15
05/07/2003 (1:41 pm)
Hey Badguy. Have you been able to do anything with the ladders yet? I had a request to see if I could put a ladder in Torque. I looked at all,very few, posts regarding this subject. It looked like you were on to something. Could you possibly let me know how you made it work or give me an idea where to start? Any help would be appreciated.

Thanks
MJ....
#16
05/07/2003 (3:20 pm)
sure ..
I created an Object alot like the trigger.

and in the player class processed collision's.
you can do many things from here. (just like trigger)

I never did much more on it.

but from where it is you need only apply a transform to the player that conforms to the ladder.

I tried a few things ..
messing with the gravity, forcing the user to hold a "ladder" button...

but the best one would be all in the player class.
where you find out contact data, and modify direction via input based on that.

In the end I had it so you werent held on the ladder..
and only skill brought you to the top.

which is cool cause Ive never played a game that allowed that.

but I havent touched it in forever..
as the need I had for it disappeared.
#17
05/07/2003 (4:49 pm)
Thanks Badguy! I will start there. If you happen to come across any of the code you used to test it, and you don't mind, please send it my way (jackie@swris.com or jackie@powerzones.com). I am still learning C++ so ANY code I can look at and learn from is a tremendous help.
#18
05/07/2003 (6:15 pm)
I have been playing with trying to get a ladder in the example app. Gravity is not the way to go. The reason being is that the upward movement is not realistic. Also going down is trick. I think badguy is right. What must be done is once a collision with the ladder is detected, the player's transform must be modified so that he can go up.

Badguy,

If you want send me the code. I will take a crack at this and post as a resource once I have something workable.

Kurt
#19
05/07/2003 (6:26 pm)
Good deal Kurt. If I get something going in the mean time I will post it here.

Thanks
#20
05/07/2003 (6:50 pm)
Ok guys..
well ..
give me a couple days and ill email it to ya this weekend.

I'll put some time into it clean up the package and make it more usefull.
Page «Previous 1 2 3 Last »