Hard Light Productions Forums

Hosted Projects - Standalone => Diaspora => Developer Blog => Topic started by: Sushi on May 26, 2011, 09:57:09 am

Title: 2011-05-26 - Combat Landings (video)
Post by: Sushi on May 26, 2011, 09:57:09 am
One of the FSO engine features we've been working on is adding support for BSG-style "combat landings," where ships fly into a landing bay and skid to a halt. Without further ado, a quick&dirty FRAPS capture demonstrating this working, (music by Phrey, original for Diaspora):

http://www.youtube.com/watch?v=vxwNJVKaFO8


To make this possible, we're combining a few different things:

1. New Landing Physics
The default collision physics don't make this sort of touchdown & skid landing at all feasible. Fighters colliding with bigger ships tend to bounce pretty far back, no matter how gently you touch down or how your ship is oriented. This may make sense for retail Freespace and some mods, but wasn't going to cut it if we wanted to be able to land a Viper on a deck. We were able to add some options to the FSO engine to give us a lot more control over this: if you want the technical details, they're on the Freespace wiki (http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Collision_Physics:).

2. New Path following
Diaspora's ships have significantly more momentum than Freespace ones do. Make a sharp turn, and you can expect to drift a ways along your original vector before straightening out. A lot of the path following code used for ship departure and docking, unfortunately, was written with Freespace's ships in mind, and our Vipers and Raptors had a hard time following the correct paths to dock or fly into a flight pod. Again, we updated the engine code to give us some more options, and the new path-following code allows our high-momentum ships to fly paths with a lot more precision. The landing paths were also given some metadata about orientation, so that ships flying into flight pods will always do so wheels-down.

3. FRED Trickery
Nothing really "new" here, just the use of SEXPS (including some recent FSO additions) in Freespace's mission designer. The main trick is that once a ship/wing is given orders to depart via fighterbay, that departure can be cancelled (so they don't just fly into the fighterbay and disappear). Letting them fly most of the departure path first, though, gets them nicely lined up for landing, and once over the deck, another SEXP is used to make the AI ships thrust gently downward.


For the future...
As neat as this is, there is plenty of room for improvement. The best thing would be real, true landing gear support: we would love to have modeled landing gears that extend out of the bottom of the ship on a keypress, and a collision physics model that works accurately with them. These improvements are not likely to make it into our first release, but will hopefully be possible in the future. If you absolutely can't live without a properly modeled landing gear... well, we can always use more coders! Volunteer today! :)
Title: Re: 26-05-11 Combat Landings (video)
Post by: General Battuta on May 26, 2011, 09:59:10 am
Badass.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Angelus on May 26, 2011, 10:16:55 am
Abso-fraking-lutely gorgeous! The landings and the music!

One question though, do CL work if the Battlestar is moving?
Title: Re: 26-05-11 Combat Landings (video)
Post by: Sushi on May 26, 2011, 11:13:58 am
Abso-fraking-lutely gorgeous! The landings and the music!

One question though, do CL work if the Battlestar is moving?

Haven't really tried it yet. :) Answer is probably yes, though, although some extra SEXP-magic may be needed to keep the ships from sliding on the deck.
Title: Re: 26-05-11 Combat Landings (video)
Post by: SirCumference on May 26, 2011, 11:19:12 am
Nice! Being able to actually land your fighter would be awesome! Lets hear it for the SCP team!
Title: Re: 26-05-11 Combat Landings (video)
Post by: StarSlayer on May 26, 2011, 12:06:13 pm
Abso-fraking-lutely gorgeous! The landings and the music!

One question though, do CL work if the Battlestar is moving?

Haven't really tried it yet. :) Answer is probably yes, though, although some extra SEXP-magic may be needed to keep the ships from sliding on the deck.

Combat landing while the Sobek does an Immelman!  :P
Title: Re: 26-05-11 Combat Landings (video)
Post by: newman on May 26, 2011, 12:07:16 pm
Combat landing while the Sobek does an Immelman!  :P

Or a Cobra. Increase Sobek's MOI in the pof for maximum fun.
Title: Re: 26-05-11 Combat Landings (video)
Post by: JGZinv on May 26, 2011, 12:10:52 pm
I'm curious what the docking sequence looks like from the cockpit view.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Sushi on May 26, 2011, 12:25:52 pm
I'm curious what the docking sequence looks like from the cockpit view.

I think showing off the cockpit from the inside is planned for our next video release.

If you want to see a landing from that perspective, bug CooperHawkes. :)
Title: Re: 26-05-11 Combat Landings (video)
Post by: Ace on May 26, 2011, 12:26:29 pm
Abso-fraking-lutely gorgeous! The landings and the music!

One question though, do CL work if the Battlestar is moving?

Haven't really tried it yet. :) Answer is probably yes, though, although some extra SEXP-magic may be needed to keep the ships from sliding on the deck.

Sliding becomes an issue when the ships are moving during launch/landing. But there's a few new tricks to immobilize ships without disabling their engines so that players don't notice any wonkiness with launch or landing sequences.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Thaeris on May 26, 2011, 12:38:06 pm
W
I
N
.

I'll need to sick Dragon on this one. Many thanks to Diaspora and the SCP. :D
Title: Re: 26-05-11 Combat Landings (video)
Post by: Madcat on May 26, 2011, 12:39:52 pm
That's awesome, good job!!!
Title: Re: 26-05-11 Combat Landings (video)
Post by: Angelus on May 26, 2011, 12:40:10 pm
Abso-fraking-lutely gorgeous! The landings and the music!

One question though, do CL work if the Battlestar is moving?

Haven't really tried it yet. :) Answer is probably yes, though, although some extra SEXP-magic may be needed to keep the ships from sliding on the deck.

Sliding becomes an issue when the ships are moving during launch/landing. But there's a few new tricks to immobilize ships without disabling their engines so that players don't notice any wonkiness with launch or landing sequences.


That made me curious beyond belief!
What tricks? How exactly? Don't hold anything back!!
Title: Re: 26-05-11 Combat Landings (video)
Post by: General Battuta on May 26, 2011, 12:57:10 pm
Uh, well, there's the set-immobile/set-mobile SEXPs.
Title: Re: 26-05-11 Combat Landings (video)
Post by: JGZinv on May 26, 2011, 08:27:48 pm
Actually I wasn't interested in the cockpit, so much as what the trip in and slow down to stop looked like from inside.
Was concerned about jerkiness or other oddities, how well it flowed.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Pred the Penguin on May 26, 2011, 08:37:48 pm
Uh, well, there's the set-immobile/set-mobile SEXPs.
Way to ruin the fun. :P

heh, the vipers are landing in formation.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Sushi on May 27, 2011, 12:37:16 am
Actually I wasn't interested in the cockpit, so much as what the trip in and slow down to stop looked like from inside.
Was concerned about jerkiness or other oddities, how well it flowed.

It looks/feels pretty good. As you can probably tell from the video, there's a tad bit of bounciness: hard to get rid of without getting situations where you occasionally fall right through the deck. In practice, though, it's not too egregious, and when we use a ship-immobilize SEXP once you're on deck and slow enough to stop, it feels very solid.

Not shown here, but the ship will respond to how you land, and sort of reorient you. If, for example, you are rotated a bit to one side or another, the act of landing will cause the ship to level out, more or less like you'd expect it to.
Title: Re: 26-05-11 Combat Landings (video)
Post by: JGZinv on May 27, 2011, 01:51:49 am
Sounds much how Tach did it's pad landings, which would force level you once the process was triggered.

Thanks, I'll keep my eyes peeled on this in the future.
Title: Re: 26-05-11 Combat Landings (video)
Post by: boewolf on May 28, 2011, 09:27:33 pm
By memory the original Robotech mod used a very small turret to switch between fighter and gerwalk.  The problem with that was it was not possible to switch back.  Something may be possible with some coding subsystem indestructibility SEXP while you are not in the pods.  Then press a predefined key and pow.  Landing gear down.  It may also be workable the other way around, with the smart cookies around here.

But all said and done.  Sugar and lollies (candy) are sweet.  But that is so much sweeter.  Keep up the great work people.
Title: Re: 26-05-11 Combat Landings (video)
Post by: AtomicClucker on May 29, 2011, 03:25:37 pm
i'm quite impressed with the work you've accomplished so far. Depending on how you take the landings, how does one avoid landing safely (short on ramming)?
Title: Re: 26-05-11 Combat Landings (video)
Post by: Commander Zane on May 29, 2011, 03:31:45 pm
how does one avoid landing safely (short on ramming)?
Make a sudden dive into the strip. :P
Title: Re: 26-05-11 Combat Landings (video)
Post by: Sushi on May 29, 2011, 06:48:46 pm
i'm quite impressed with the work you've accomplished so far. Depending on how you take the landings, how does one avoid landing safely (short on ramming)?

At the moment, it's pretty hard to kill yourself with a collision: an afterburner-fueled ram straight into the deck is going to knock off 10% of your hitpoints, maybe. Blame the Freespace engine: it nerfs collision damage pretty severely in a few different ways. I'd love to fix that at some point. :)

For now, if you don't land correctly, you'll get a nasty crashing sound, take some damage (depending on exactly how badly you did), and shake a lot.
Title: Re: 26-05-11 Combat Landings (video)
Post by: karajorma on May 29, 2011, 07:10:47 pm
To be honest I'm not unhappy with the nerf on most difficulty levels. Especially given how often the AI have a habit of flying into you. :p

Of course we can always remove it on insane difficulty. :D
Title: Re: 26-05-11 Combat Landings (video)
Post by: Sushi on May 29, 2011, 07:51:44 pm
Yeah, it would be nice to have some solid per-difficulty-level controls for it. So we could have everything between Freespace Bumper Cars and X-wing's "touch and die."
Title: Re: 26-05-11 Combat Landings (video)
Post by: Dragon on May 30, 2011, 09:23:55 am
I'd like to be capable of using WC-style ramming tactics (of course, much less usefull because of 3D engine, but still possible), though for Diaspora, it might be better to emulate how colisions were handled on the show (I don't watch it, the only contact with BSG I had was throught BTRL).
Title: Re: 26-05-11 Combat Landings (video)
Post by: Commander Zane on May 30, 2011, 09:30:26 am
How would it be less useful? I'd imagine it would be better since you'd actually hit where you're aiming at instead of phasing through ships at certain angles.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Dragon on May 30, 2011, 02:55:37 pm
I mean, in 2D Wing Commanders, it was much easier to actually connect with enemy ship. 3D games have more precise colision detection and flying into something that's trying to avoid this can get difficult (for example, compare asteroid fields in WC2 and WC3).
Title: Re: 26-05-11 Combat Landings (video)
Post by: Commander Zane on May 30, 2011, 03:04:34 pm
I wouldn't know about any other Wing Commander besides the first one, and what I do remember is that it took a particular approach to hitting ships otherwise you'd simply pass through the ship sprite. Being easier to hit ships, I'm not sure if that's true.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Dragon on May 30, 2011, 03:36:57 pm
Strange. Both me and my father used ramming for great effect in WC1 and WC2 (my father also used it in Priv). I've never noticed passing throught ship's sprite.
Title: Re: 26-05-11 Combat Landings (video)
Post by: PhRey on May 30, 2011, 03:44:04 pm
It's good to see some new animated pictures ;o) great job !
Title: Re: 26-05-11 Combat Landings (video)
Post by: AtomicClucker on May 30, 2011, 05:04:09 pm
Strange. Both me and my father used ramming for great effect in WC1 and WC2 (my father also used it in Priv). I've never noticed passing throught ship's sprite.

I killed Thrakkath in WC3 by an unintentional ramming, was low on fuel, desperate, and proceeded to fly right through him... the rest is history.
Title: Re: 26-05-11 Combat Landings (video)
Post by: Felix 039 on June 01, 2011, 03:30:06 am
I wish there are more physics involved, like Vipers bouncing a little on the deck until it stops moving/have low enough momentum. And sparks flying out when the bottom of the bird grind against the landing pad.

Any chance we can see a REAL combat landing? With the Battlestar's KEWs firing and stuff? Something similar to the first combat landing as seen in the battle of ragnar?
Title: Re: 26-05-11 Combat Landings (video)
Post by: newman on June 01, 2011, 03:33:04 am
Any chance we can see a REAL combat landing? With the Battlestar's KEWs firing and stuff? Something similar to the first combat landing as seen in the battle of ragnar?

Sure, but doing trailers requires time so it really depends on people like CooperHawkes having a free window to pull off something like that. We definitely want to release another trailer as soon as we manage, that'll showcase more than just combat landings - some trackIR footage of the cockpits is something we wanted to show off in a video as well.
Title: Re: 26-05-11 Combat Landings (video)
Post by: diuqil69 on June 12, 2011, 02:31:59 am
I'm curious as to what 3d graphic design program yall use to make the ships and such. :p
Title: Re: 26-05-11 Combat Landings (video)
Post by: newman on June 12, 2011, 02:48:01 am
Mainly 3ds max and Photoshop. Some members used Lightwave but a vast majority of the ships you see in the game were built in max.