Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → grappling hooks
12
grappling hooks
2004-10-10, 8:28 PM #1
Has anyone had any luck making a grappling hook that keeps you at the right distance from the hook itself? i.e. the rope not magically getting longer by itself. The rope has to have a pendulum effect to it. A good example is the rope from Tribes:Vengeance.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-10-11, 4:15 PM #2
I don't know, try asking qui- oh wait. :-P
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-10-11, 4:41 PM #3
Does anybody know how to map out an arc in 2d/3d space? If so, I could whip up somethin mighty quick. ;)
-Hell Raiser
2004-10-13, 10:26 PM #4
Bah, I did a bunch of vector math, and this is the result:

[http://www.hellraiser64.com/Pics/Arc2.jpg]

I had fly mode on, and rose up and back so that it would "snap" and start swinging me. What you see above, that yellow line/curve is the path I took. I only got half of the arc swing going. You'll stop when you're under the hook, so no swinging back and forth yet. With what I spent about 3 hours on, I'm positive I can whip up a grappling hook that reacts (and looks, ;) ) surprisingly real in a day or two. :D

[Edited for better angle]
-Hell Raiser
2004-10-13, 10:32 PM #5
Wow that looks great! I know what would e really cool but probably unlikely, if the sector you were in when using the grapple had any of the wind sounds and depending on the volume you could sway back and forth in the wind.
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-10-13, 10:36 PM #6
Quote:
Originally posted by a_person
Wow that looks great! I know what would e really cool but probably unlikely, if the sector you were in when using the grapple had any of the wind sounds and depending on the volume you could sway back and forth in the wind.


That would require at least some sector thrust.

BTW, I edited the message, I got a better angle for the screenshot. :)
-Hell Raiser
2004-10-13, 11:46 PM #7
Wow. I would never have thought it possible to create a grapple that looks that good.

Just a question, does the rope react to the bridge, creating a bend point?
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-10-14, 1:00 AM #8
I'm most impressed with that effect Hell Raiser :eek: :D - that's <insert respectful kudos word> amazing - and in just 3 hours too... just - wow :eek:

Keep it coming - I think we could all benefit from your input in this thread :D

-Jackpot
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-10-14, 3:33 AM #9
Drat! This thread reminded me that I wanted to look through all of the grappling hook cogs that I could find, then try to make one that was 'realistic'. (I guess I have too many other JK projects going anyway. :) )

In my initial research, I came across a thread in which Hell Raiser and TIE_14 posted some code that was described as doing something like what is wanted in this thread.

Hell Raiser, what is the difference with your new code?

:)
2004-10-14, 9:29 AM #10
Thanks for the comments. It's never been done before, untill now! :D

Quote:
Originally posted by SG-fan
Just a question, does the rope react to the bridge, creating a bend point?


Eh? :confused: If by a "ragdoll" type rope, I'm not sure I can make it look that good, but who knows? That'll be the last thing I implament, cuz it's just eye candy. ;)

Quote:
Originally posted by ZeqMacaw
In my initial research, I came across a thread in which Hell Raiser and TIE_14 posted some code that was described as doing something like what is wanted in this thread.

Hell Raiser, what is the difference with your new code?


I don't quite recall the thread in question, and I don't think I've ever tried a grapple hook with arc swing before...
-Hell Raiser
2004-10-14, 10:17 AM #11
Oops! I forgot to insert the link to the thread I was talking about; here it is:
Grapple, with seperate retract key

It might be helpful.

:)
2004-10-14, 1:16 PM #12
Eh, it doesn't really operate within the boundaries of a person swinging by a rope, and it's a bit jittery, not smooth. :)

What I'm doing is much different, lots of vector math to figure out where the player should be heading. :D
-Hell Raiser
2004-10-14, 2:55 PM #13
Shockaz and I had some fancy grapple cogs that quib-mask WAS making, until he disapeared. Perhaps you guys would like to take a stab at them?

JediKirby
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-10-14, 3:06 PM #14
I was thinking of making it act like the one in Wind Waker, and thats what I'm almost done with. (minus any spiffy models) :)
-Hell Raiser
2004-10-16, 12:42 AM #15
AH! SO MANY NOTES!

Quote:

//NOTES:
//Almost to perfection!
//Works pretty well!

//**Trying to add in player thrust:
//Forward works pretty good, need
//to check if we're going to go
//higher than the hook and stop that.

//**Holding backwards to quickly scale
//down the arc so we stop doesn't work
//quite right. The scale is too big
//and messes up the STOP SWINGING code

//**Hook will decrease the length of the
//arc from the end of each Upward swing
//so you eventually stop under the hook.
//The SwingSpeed is still a little off. - Maybe??
//Too fast starting up, too slow starting down.

//When Swinging has Stopped:
//**Need to let player start swinging again,
// so create start position based on
// lookvector so we can change swinging direction
//**Jump to climb up, crouch to climb down.

//Max rope and Min rope length will need to apply.

//**Sometimes when reaching the EndPos, if the
//Arc is big enough, the player will jitter
//up to the EndPos|| The step position needed to
//be raised above the player as well as in front

//Mess with MaxSpeed, speed still a little strange.

//If player presses the jump while swinging, the
//hook should turn off, and the player should have
//some force applied acording to their Vel.

//If we're attached to something, don't start swinging,
//stop current swing, prevent the player from moving
//further away from the hook, and reset gravity/thrust flags

//Check for walls! (OWIE!!!)
//If we smacked while going up, then consider Current pos as start and swing down
//If we smacked while going down, then stop swinging.
//How will we know if we're stopped?
//Timer to check current StepPos from last?
//StepPos should _always_ be further away from the last one
//Using above logic, we'll need to redo downswing code to be like upswing

//Redo the StepPos code in DownSwing so it runs along the lines of UpSwing.
//I'm torn between current "Best" StepPos code, and making the StepPos
//0.1 above the player, and infront, at a 45 degree angle.
//Review what will happen to the speed of the swing with 45 degree way.

//If rope is interfered with by level, make hook pos equal to interfere pos.
[/size]

Lines marked with ** are completed. :D

Any beefs? :p
-Hell Raiser
2004-10-16, 7:59 PM #16
I spent a lot of time in school planning out this sort of thing and calculating it, but I never took the time to get all of my editing resources back. I am excited for a high quality grappler.
2004-10-22, 9:27 PM #17
Fairly large *BUMP*
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-10-25, 9:25 PM #18
bump 2
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-10-25, 10:03 PM #19
I haven't forgotten about this. :) I had to get [url]www.hellraiser64.com[/url] back up and running. Now I can work on this a bit more. I'm trying to get it to create the rope in a rag-doll fashion, unfortunatly it's not working like I thought it would. :o
-Hell Raiser
2004-10-26, 4:03 PM #20
This is a VERY cool project, and exactly what I'm looking for with what I wanted. Anyone smell spiderman?

Speaking of such, it'd be interesting to get some horizontal swing in there, as if taking a corner-like swing ala spidey?

JediKirby
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-10-26, 7:08 PM #21
Hm. Would it be possible to attach this while on the ground, run off a ledge, and use your descent as momentum? For instance, affixing the hook to the corner of a building, running off a ledge, and swinging around the building? Cause that would rock like crazy.
Hazard a company one process.
2004-10-26, 7:52 PM #22
Let me sum up what the above post said:

What I said.

Everyone seems to be able to explain exactly what I mean, but better than I do latelly. It makes me sad. :gbk:

JediKirby
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-10-26, 9:09 PM #23
It sounds like you would be able to. HR's just gotta get it so you don't stop when you're directly under the hook (aka: improve his "physics system" ;)) and then it should do just that.
May the mass times acceleration be with you.
2004-10-27, 1:07 AM #24
Hmmm, like SpiderMan? I dunno.... Lemme get "Like WindWaker" out of the way first. :) Adding in horizontal swing would add in the possibility that you would swing around in circles horizontally while the diameter of your circle swing decreases, and your Z Position goes lower. Bleh, too much math and if's to think about right now. ;)
-Hell Raiser
2004-10-27, 2:21 PM #25
But it'd be so kick ***, if that could be acheived!
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-10-31, 9:19 AM #26
It seems to me like the grapple would stay there for a period of time, if so would multiple people be able to use one hook or only the player that placed it?
All is fair in love and war.
2004-10-31, 10:50 PM #27
Umm, each person would have their own grapple hook.
-Hell Raiser
2004-10-31, 11:01 PM #28
does it stay there for a period of time?
All is fair in love and war.
2004-10-31, 11:41 PM #29
You shoot it, it sticks, and you decide when to release it.
-Hell Raiser
2004-11-01, 5:55 PM #30
You are attached to it until you release it. It can't hang there by itself.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-11-04, 5:10 PM #31
tiny bump so people might give some useful suggestions...
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-11-06, 1:21 PM #32
This is driving me nuts! I can't really figure out a way to handle a ragdoll rope right now. Everything I have tried that worked in my head has failed. :(

So I'm skipping that part of the grapple hook to save my sanity. Right now I'm trying to figure out a way to tell if the player has bumped into something so I can stop the swing.
-Hell Raiser
2004-11-07, 4:51 PM #33
I might have some ideas about the ragdoll, but it depends on how you are moving the rope. Are the pieces deleted or do they actually move with thrust?
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-11-08, 12:24 AM #34
Well, it can go anyway that I'd like it. It was supposed to create the pieces, then the peices were supposed to keep a loose alignment on the one in front of it, so the whole dynamic of it changed with the player position. But that didn't work. Right now I just constantly create the pieces from the player to the hook and they explode after 0.1 seconds. *warning, will cause seizures*

Mind you the rope is just a visual effect. The physics of a grapple hook swing are complete, minus bumpping into crap.
-Hell Raiser
2004-11-08, 8:58 PM #35
http://forums.massassi.net/vb/showthread.php?s=&threadid=15747
Just pointing this out, on the chance that HR hadn't seen it. Hopefully it helps, maybe not but it was worth a shot
</sarcasm>
<Anovis> mmmm I wanna lick your wet, Mentis.
__________
2004-11-08, 9:25 PM #36
Well thats one way to see if you bumpped into something. :)
-Hell Raiser
2004-11-14, 8:29 PM #37
Quote:
Originally posted by Hell Raiser
Well thats one way to see if you bumpped into something. :)


Speaking of Bumping...
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-11-14, 9:11 PM #38
Maybe you should Google around for tutorials on rope physics. Places like GameDev.net, NeHe.GameDev.net, etc. Rope physics is a common fun thing that novices like to put in demo programs. They don't have any kind of physics engine behind it to start with, so they don't have much more to work with than you do, other than the fact that they have trig and calculus, but you can write those functions yourself in COG (although they may be quite slow). Reference triangles can be used for trig values not multiples of 90 degrees. If that solution is too slow (as it requires making of rudimentary functions in COG), you may try an iterative solution to calculate the trig functions with brute force (Google for algorithms of the trig functions, if I recall some are like infinite sums, so the farther you go, the more accurate you get). You may also try hardcoding trig values in increments of say, 5-10 degrees and interpolating between them. It's not too accurate, but for JK, who cares?
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2004-11-14, 11:50 PM #39
I have no problems simulating physics with vector math. :cool:

I just need some time to incorporate the bumping into crap. :o
-Hell Raiser
2004-11-15, 8:43 AM #40
Weren't you the one complaining that JK had no trig? Mmm maybe that was Hellcat.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
12

↑ Up to the top!