Hard Light Productions Forums

Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: Mobius on July 01, 2008, 06:55:35 pm

Title: Grapple guns: are they possible?
Post by: Mobius on July 01, 2008, 06:55:35 pm
I don't know if you've ever player a sci-fi games in which the player had to make use of grapple guns, but I wonder if it's possible to recreate that effect via Scripting since the original FreeSpace engine never made use of such a feature.

I haven't found Scripts that might help, however. Though it's possible to "draw" the grapple I'd like to know if it's also possible to use it in a realistic way(like moving cargo containers).

The grapple will also be static and unrealistic(it'll be a straight, textured line connecting two ships)unless a solution is found: what about beam-green and beam-white3-like animations? Will them work? They seem quite flexible, IMO.
Title: Re: Grapple guns: are they possible?
Post by: haloboy100 on July 01, 2008, 06:58:02 pm
Hasn't this been suggested before?
Title: Re: Grapple guns: are they possible?
Post by: Mobius on July 01, 2008, 07:02:17 pm
I don't really know...

Was it proposal you're refering to VERY similar to mine?
Title: Re: Grapple guns: are they possible?
Post by: Solatar on July 01, 2008, 07:45:05 pm
How similar would this act to a tractor beam?
Title: Re: Grapple guns: are they possible?
Post by: WMCoolmon on July 02, 2008, 12:45:34 am
To "draw" the grapple you'd need the draw-beam code. It's not in scripting but there's no strong reason for it not being in scripting.

To move things around, you'd need to handle the physics. You'd probably want to have a maximum length the grapple line would get to, and then force the offset of the grappled object to remain the same as the grappled ship, until the ship started to slow down, at which point you'd want to let the object decelerate to the ship's speed (during which time the object would get relatively closer to the ship).

You'd also have to handle the object's tendency to align itself parallel to the direction of movement to the ship.
Title: Re: Grapple guns: are they possible?
Post by: Mobius on July 02, 2008, 11:47:48 am
How similar would this act to a tractor beam?

What do you mean by tractor beam? If you're refering to the one used by the Death Star I'd say no.

The grapple gun isn't made of energy and is supposed to remain attached to the ship until the destruction of the target or the deactivation of the grapple itself. I'm afraid it's much harder to represent ingame.


To "draw" the grapple you'd need the draw-beam code. It's not in scripting but there's no strong reason for it not being in scripting.

To move things around, you'd need to handle the physics. You'd probably want to have a maximum length the grapple line would get to, and then force the offset of the grappled object to remain the same as the grappled ship, until the ship started to slow down, at which point you'd want to let the object decelerate to the ship's speed (during which time the object would get relatively closer to the ship).

You'd also have to handle the object's tendency to align itself parallel to the direction of movement to the ship.

I know some basics and I wonder if this draw-beam can work. I mean, the grapple gun is pretty much like a rope, it won't be a straight like connecting two ships.

Another important thing is the traction ability but I guess it'll depend on the mass...
Title: Re: Grapple guns: are they possible?
Post by: WMCoolmon on July 02, 2008, 02:04:21 pm
I thought you said:

Quote
The grapple will also be static and unrealistic(it'll be a straight, textured line connecting two ships)

If you didn't mean that and want realistic rope physics, then the answer isn't no, but you'll have to do a lot more work for that.

I can't answer your question unless you explain what you want and don't change your mind when I reply. A line can't be straight and non-straight at the same time.
Title: Re: Grapple guns: are they possible?
Post by: Mobius on July 02, 2008, 04:17:02 pm
Actually my statement was slightly different:

The grapple will also be static and unrealistic(it'll be a straight, textured line connecting two ships)unless a solution is found: what about beam-green and beam-white3-like animations? Will them work? They seem quite flexible, IMO.

For now even something similar to a tractor beam should be enough because the project that is going to use this new feature needs a lot of time to be released and I don't exclude to learn more about Scripting until then. :)
Title: Re: Grapple guns: are they possible?
Post by: Talon 1024 on July 02, 2008, 04:38:43 pm
I need something like this for my Landreich Campaign too...  At one point in False Colors, a Hornet has to tow another ship.  I always thought it would be possible with scripting.

And for my campaign, it's going to be a tractor beam, not a rope...
Title: Re: Grapple guns: are they possible?
Post by: Mobius on July 02, 2008, 04:40:34 pm
A tractor beam should be enough for me, maybe in the future I will turn it into a "rope".
Title: Re: Grapple guns: are they possible?
Post by: Akalabeth Angel on July 05, 2008, 05:57:12 pm
I need something like this for my Landreich Campaign too...  At one point in False Colors, a Hornet has to tow another ship.  I always thought it would be possible with scripting.

And for my campaign, it's going to be a tractor beam, not a rope...

         You could always use a grapple like do they on Babylon 5. Basically a straight metal arm that extends down. Maybe a special model has an arm that animates to swivel downward, and at the end is a docking point which docks with the target craft.
Title: Re: Grapple guns: are they possible?
Post by: WMCoolmon on July 06, 2008, 02:25:45 am
It doesn't have to be a tractor beam. A rope under constant tension will look a lot like a straight line. Since there's no gravity or air resistance in space, the rope is going to move in a more or less straight line. If you already have it coded to move properly, it'd be very easy to add code to make the line vibrate when the force changes suddenly.

It's also reasonable to assume that the towing ship would always put constant tension on the line, even if the ships were moving closer together, in order to keep the line from getting tangled in itself. At the very least it's an explanation that you could use that the majority of your audience will buy. :p
Title: Re: Grapple guns: are they possible?
Post by: Mobius on July 06, 2008, 05:14:15 am
Looks like there already is something similar to what I'm looking for...where is it? :)
Title: Re: Grapple guns: are they possible?
Post by: WMCoolmon on July 09, 2008, 07:19:02 pm
I don't know of anybody who's done a tow line with scripting.
Title: Re: Grapple guns: are they possible?
Post by: haloboy100 on July 11, 2008, 05:09:37 pm
You know, we get enough requests like this, the coders might need to make an (updated?) physics engine.
Title: Re: Grapple guns: are they possible?
Post by: Einstine909 on July 11, 2008, 05:27:57 pm
Wow, its been a while sense I've posted... :sigh:

Anyway, this was talked about before IIRC, you can use a beam weapon with a damage value of 0 and a negative mass, that creates a tractor beam, give it a positive mass and it repels objects.

Im going to read up on this... to see if what I wrote actually works.
Title: Re: Grapple guns: are they possible?
Post by: haloboy100 on July 11, 2008, 05:30:44 pm
If it did work, wouldn't it be in the code already?
Title: Re: Grapple guns: are they possible?
Post by: Einstine909 on July 11, 2008, 05:49:10 pm
It is in the code, its just a beam without damage... just no one uses it... yeah... :blah:
Title: Re: Grapple guns: are they possible?
Post by: starlord on July 18, 2008, 02:42:17 pm
Anyone there thinking colony wars? :lol:
Title: Re: Grapple guns: are they possible?
Post by: Mobius on August 12, 2008, 08:36:32 am
Anyone there thinking colony wars? :lol:

What if I tell you that this thread is linked to a possible CW conversion for FS2? :P
Title: Re: Grapple guns: are they possible?
Post by: Al Tarket on August 12, 2008, 08:41:23 am
this grapple gun sounds similar of enterprise's grapple gun, late in season 3 where they found one of the guardians in a pod inside an expanding anomaly field before they got enveloped inside too.
Title: Re: Grapple guns: are they possible?
Post by: Mobius on August 12, 2008, 08:44:26 am
There are many grapple guns in sci-fi...
Title: Re: Grapple guns: are they possible?
Post by: starlord on August 12, 2008, 11:36:12 am
Mobius: seriously? :eek: