Hard Light Productions Forums

General FreeSpace => FreeSpace Discussion => Topic started by: Iain Baker on July 06, 2019, 01:09:04 pm

Title: Fully 3D battlespace
Post by: Iain Baker on July 06, 2019, 01:09:04 pm
Hi all :-)

Something I have noticed in most space combat games, and space RTS games such as Homeworld, is that despite space offering a fully 3D battlespace, most of the time the action remains in a relatively 'flat' plane. Homeworld had a few instances where attacking ships would approach from above or below, but this was the exception as opposed to the rule.

This clip form Babylon 5 shows what I mean. The Vorlons come up from underneath the Shadows at a 90(ish) degree angle. Imagine a whole fleet of ships doing that against an enemy who's cap ships are not as fast or agile as the Shadows were, and so an entire fleet could find itself getting attacked from an unusual vector - perhaps taking advantage of the defending fleet's turret placements and blind-spots etc.

https://www.youtube.com/watch?v=WR2nXCjvs0s (https://www.youtube.com/watch?v=WR2nXCjvs0s)

Has anyone played a game / mission which takes full advantage of a fully 3D battlespace - apart from the Descent series  of course. If so, what was it like to play? Was it interesting, or just confusing?
Title: Re: Fully 3D battlespace
Post by: Nyctaeus on July 06, 2019, 01:18:29 pm
I'm working on one. Stay tuned :]
Title: Re: Fully 3D battlespace
Post by: Novachen on July 06, 2019, 01:56:02 pm
I remember Shattered Horizon. That was very interesting back then :-).

And Miner Wars 2049 of course, but that is very Descent/Freespace-ish anyway, because people of both games were involved in it.

But as far RTS goes... i do not remember actually. I think Nexus was the closest to real 3D-strategy. Next to Starshatter: The Gathering Storm  :D.

But i did not played many Space-RTS so far.
Title: Re: Fully 3D battlespace
Post by: Iain Baker on July 06, 2019, 02:04:28 pm
I'm working on one. Stay tuned :]

 :)
Title: Re: Fully 3D battlespace
Post by: 0rph3u5 on July 06, 2019, 02:18:56 pm
So there a few fundamental problems with using a 3D space:

Human eye-sight is actually configured to prioritize horizontal over vertical scanning. As a result it is much harder to to present objects that vertically tall and to use plains of action that are at a right angle to each other.

And when estimating distances your brain uses the relative size of objects to another and to a fixed point and vice versa - the absence of a fixed point tend to throw of estimates of distance, e.g. at sea. One way to provide a fixed "point" is to have a fixed horizont, e.g. by having a main plain of action.
Title: Re: Fully 3D battlespace
Post by: Iain Baker on July 06, 2019, 03:48:14 pm
So there a few fundamental problems with using a 3D space:

Human eye-sight is actually configured to prioritize horizontal over vertical scanning. As a result it is much harder to to present objects that vertically tall and to use plains of action that are at a right angle to each other.

And when estimating distances your brain uses the relative size of objects to another and to a fixed point and vice versa - the absence of a fixed point tend to throw of estimates of distance, e.g. at sea. One way to provide a fixed "point" is to have a fixed horizont, e.g. by having a main plain of action.


Coming from an evolutionary biology background that's pretty much what I figured too - our brains are not wired for fully 3D movement in a medium with no visual cues. A hypothetical sapient benthic (open ocean) species might handle it better (If we were to hand-wave the small issue of a species that probably couldn't harness fire couldn't ever develop the technology to create video games  :p )
Title: Re: Fully 3D battlespace
Post by: Mito [PL] on July 06, 2019, 05:02:56 pm
I'm pretty sure there were at least some FS campaigns that made use, at least limited, of the full 3D capabilities of FSO. Not sure which ones, though, it would seem that I was more busy with shooting baddies than wondering if the mission uses three dimensions of space properly.

Also the issue of horizontal view priority isn't a problem in FSO since there isn't an apparent up and down directions either way and you can rotate your ship in any axis possible.
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 06, 2019, 05:55:10 pm
In theory you could take your finished mission and rotate everything...
Title: Re: Fully 3D battlespace
Post by: Nyctaeus on July 06, 2019, 06:02:46 pm
In theory you could take your finished mission and rotate everything...
Unless you've used some coordinate-dependent sexps for [for example] nanojumps.
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 06, 2019, 06:36:04 pm
Or tons of cutscene stuff, yeah. :o
Title: Re: Fully 3D battlespace
Post by: General Battuta on July 06, 2019, 10:29:54 pm
Just about every mission using 'arrive 3000m from' event cues (or whatever distance) is going to exploit a pretty broad range of 3D space.

Part of the issue is that any 2 combatants in 3D space define a plane, so unless you have lots of ships involved it tends to turn out looking 2D no matter what their 'absolute' coordinates.
Title: Re: Fully 3D battlespace
Post by: GhylTarvoke on July 06, 2019, 10:48:00 pm
Part of the issue is that any 2 combatants in 3D space define a plane

Well, any 3 combatants.

I do feel that War in Heaven was more 3D than any other campaign I've played.
Title: Re: Fully 3D battlespace
Post by: 0rph3u5 on July 07, 2019, 02:29:43 am
Also the issue of horizontal view priority isn't a problem in FSO since there isn't an apparent up and down directions either way and you can rotate your ship in any axis possible.

On the player side, yes but ...

I don't have enough data but I see it often enough in LPs (and with myself) that people "level off" from time to time. ("level off" is when you use any object and use its orientation to determine what is level in your frame of reference and orient yourself accordingly).

On the design side, you might not notice it but a lot of missions don't use the Y-axis to the same degree as the X- or Z-axis - I can say that for me it is somewhere between 1 to 2 and 1 to 3. And that's before you take the plane and rotate it.

That you scale less on Y than on X and Z does contribute the perception you don't utilize 3D space properly.
Title: Re: Fully 3D battlespace
Post by: Colonol Dekker on July 07, 2019, 04:31:34 am
It's human nature to normalise frames of reference.
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 07, 2019, 06:51:25 am
You could additionally rotate ships around there axis.
Title: Re: Fully 3D battlespace
Post by: Firesteel on July 07, 2019, 04:59:17 pm
Homeworld is probably the only 3D RTS out there and the main reason the campaign doesn't use it all that much is because coding AI behavior to work in 3D space like that is hard at that level.

I thought House of the Dying Sun did a decent job of utilizing 3D space.

The problem with fully 3D games (and why there's so few actual 6DOF games) is that humans are really bad at 3D navigation, especially when there are points of reference like in Descent.

At least in more traditional space combat games, you don't have up to worry about.


And to Battuta's point about about random points and distances: yes. The issue is that to make a space actually playable, you generally don't want a massive number of entities moving fully in 3D space. Keeping track of all that is a nightmare for a player and will get them confused.
Title: Re: Fully 3D battlespace
Post by: X3N0-Life-Form on July 08, 2019, 05:21:28 am
Creating missions to use all 3 dimensions is easy, making the player aware that action is actually taking place in 3 dimensions, that's trickier.

As mentioned earlier, players tend to redefine The Plane as the mission goes on, depending on were The Action is at any given time. So if you want to give the mission a 3D feel, you need to invest some time and effort. Here is an example approach :
- Define a standard plane or vector for the mission (eg. capships in parade formation, a space station, ship going from A to B, etc.), and make the player aware of that plane (show a bird's eye view of it, either through a cutscene or by having the player fly towards the plane-defining thingy, etc.), then you can play with the direction of the Action to highlight it.
- Make sure the player regularly intersects with the plane or vector, or at least have it in view when having a new point of interest pop up.
- You can also use the starfield to help construct points of reference, for instance : have a planet on the right, a moon on the left, a pair of suns behind, dark blue nebulae in front, bright yellow nebulae on top and an empty starfield bellow. Or any number of big background objects, really (see the Karos graveyard from the Homeworld series).

And of course, you always need to keep this in mind :
The issue is that to make a space actually playable, you generally don't want a massive number of entities moving fully in 3D space. Keeping track of all that is a nightmare for a player and will get them confused.
And it's a lot of added complexity for the mission designer.


tldr;
Making 2D missions : trivial
Making 3D missions: easy
Making the player aware that he's in 3D missions : tricky
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 08, 2019, 06:55:11 am
- You can also use the starfield to help construct points of reference, for instance : have a planet on the right, a moon on the left, a pair of suns behind, dark blue nebulae in front, bright yellow nebulae on top and an empty starfield bellow. Or any number of big background objects, really (see the Karos graveyard from the Homeworld series).

If I would do "more 3D" missions I'd rather particular avoid that unless it makes astronomically sense.
Title: Re: Fully 3D battlespace
Post by: Mito [PL] on July 08, 2019, 09:45:00 am
I'd rather say that multiple Freespace missions take place not in a 2D plane or a more widely defined 3D space, but along a friendlies - space - enemies axis. I didn't play Freespace too much recently so I can't remember many missions well, so I'll just be taking several widely known missions from War in Heaven as examples.

Delenda Est and Her Finest Hour take place in such environments, where the friendly force roughly moves along a single vector and most of the action takes place there too. In both I tend to align myself in space in such a way that the planet nearby remains to my right - just as in the start of these missions. The layout of Delenda Est is strictly related to a single vector (except the first two enemy wings and the ending section. On the other hand in Her Finest Hour, you actually want to be away from the action - you're supposed to depart from the main battle axis to hit vital targets and catch the enemy off guard. Collateral Damage initially uses a more or less 3D bubble of action, then selects a single vector, and then changes to a different one. Darkest Hour is mostly flat with the exception of a single vector of the Trebuchet strike. One Future is an interesting case - only the player's preference decides whether the asteroid is below you, or to your right (with MacDuff being directly in front of you).

So I guess that the perception of up and down is mostly up to the presence of background objects and the orientation of major capital ships.

I think that we also need to consider turret coverage when it comes to full 3D battlespace. For example, I think that most FS2 capships have got holes in AAA coverage in their horizontal planes, which kinda streamlines the gameplay. But on the other hand, many ships tend to have large zones with no anti-cap weapons underneath them, like Deimos and Sobek.

If I was trying to work with my capships doing battles utilising the full 3D space properly, I'd also introdce ships rolling over to face threats with their best angles.
Title: Re: Fully 3D battlespace
Post by: Firesteel on July 08, 2019, 11:11:26 am
If I was trying to work with my capships doing battles utilising the full 3D space properly, I'd also introdce ships rolling over to face threats with their best angles.

That's something I think is theoretically doable at the AI level (that is if we ever overhaul that with a module). There's some reasonably simple FSM or behavior tree sequences you could do to prioritize facing cap ship weapons and rolling based on density of fighters and bombers in specific angles. Hell, the fact that most ships in FS have minute+ life times, doing some kind of GOAP (FEAR AI) or other planning approach could actually be viable.
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 08, 2019, 12:38:51 pm
So I guess that the perception of up and down is mostly up to the presence of background objects and the orientation of major capital ships.

I think that we also need to consider turret coverage when it comes to full 3D battlespace. For example, I think that most FS2 capships have got holes in AAA coverage in their horizontal planes, which kinda streamlines the gameplay. But on the other hand, many ships tend to have large zones with no anti-cap weapons underneath them, like Deimos and Sobek.

Most ships in FS2 have their main weapons aligned on a certain axis, so there are holes that could be used for tactical strikes.

Hell, the fact that most ships in FS have minute+ life times, doing some kind of GOAP (FEAR AI) or other planning approach could actually be viable.
So far you've got to make everything with bare SEXP hands.
Title: Re: Fully 3D battlespace
Post by: Firesteel on July 08, 2019, 02:02:37 pm
So far you've got to make everything with bare SEXP hands.

As an AI researcher, I might be able to convince someone in my department that this is somehow related to the things I'm currently doing so I can try and add some more modern AI code in there. Since mission files are plain text, I think doing something creative with the events for controlling ship behavior is actually pretty feasible, even if it starts out as loading them all into a data structure and then giving them some kind of dynamically weighted priority on execution.
Title: Re: Fully 3D battlespace
Post by: General Battuta on July 08, 2019, 02:07:48 pm
The big issue with any kind of advanced capship behavior is preventing them from running into each other. Unscripted, 'twitchy' capship movement can also look really goofy.
Title: Re: Fully 3D battlespace
Post by: Mito [PL] on July 08, 2019, 04:12:41 pm
I mostly meant capital ship movements in regard to other capital ships. Something like Deimos corvettes are doing in Delenda Est, roll when they lose main beams one of their sides. I feel like capital ships in Freespace generally move too slow relative to fighters to really be able to make a visible difference. And in many instances the proper movements can be at least vaguely recreated with not so complex systems of SEXPs.

On the other hand, a really improved AI code would grant us the capability to make faster ships move better.
Title: Re: Fully 3D battlespace
Post by: Firesteel on July 08, 2019, 07:36:49 pm
Not having looked at the current state of the AI code, I don't know how ships follow orders, but a more robust order system and better behavior based on orders is probably something useful to try and deal with.
Title: Re: Fully 3D battlespace
Post by: General Battuta on July 08, 2019, 10:38:09 pm
You'd think so, but I honestly believe the best way to get better capship fights is to expand the sexp/scripting tools available to mission designers, not the warship AI. You generally do not want to let warships do anything under their own control except for fire anti-fighter weapons. Everything else should be scripted.

The exception, I guess, is capship command missions. Even there I try to have enemy ships moving on waypoints relative to the player ship. This can get complicated and irritating in a few specific cases which I am currently too dumb to remember and explain.
Title: Re: Fully 3D battlespace
Post by: General Battuta on July 08, 2019, 10:39:30 pm
One of my dream goals for BP2 Act 4 is to have a fully consistent set of 'advanced' warship behaviors, unifying their jump charge, turret ROF, armor class, ECM state, and damage control into one coherent model that players can interact with and learn, rather than doing it on an ad-hoc basis per mission.
Title: Re: Fully 3D battlespace
Post by: Firesteel on July 08, 2019, 11:32:29 pm
That last post was more about fighters and bombers rather than cap ships since the fighters and bombers in FS have at least semi-coherent behavior when it comes to telling them to attack or guard something (outside of the FSPort tutorial about giving orders, ironically)

Looking back at the many years ago attempts I made at Fredding, yeah the baseline capship behaviors are really bad.

Is there an orient ship axis to another ship axis SEXP at all?
Title: Re: Fully 3D battlespace
Post by: Firesteel on July 08, 2019, 11:37:36 pm
I guess another question (since I'm not that familiar with the codebase) is, is that more of an additional engine functionality thing you'd ideally want, a lua scripting thing, or something else. Cause off hand that sounds like a reasonably sized class that would be fairly easy to hook into things (or as easy as C++ ever lets anything be).
Title: Re: Fully 3D battlespace
Post by: Admiral MS on July 09, 2019, 05:14:54 am
For RTS games proper intuitive controls for 3D space are not so simple and to actually understand how ships are positioned relative to each other a reference plane is more or less required. Then naturally everything ends up somehow oriented towards the reference plane, just to make it easier for the creator and user. In addition, Freespace movement/AI code seemed to try to orient ships along the X-Z plane in some cases.

If you just want capships to be able to move-attack something in 3D space without bouncing into each other (approximate ships as spheres or blocks) and orient themself in such a way that they get most firepower on the target (also big guns shooting only at specified target and no friendly fire on other caps in the way), then lua scripting using the current codebase is good enough. I had a mostly working version of that 5 years ago or so, but never got around to make it standalone from the other Freespace RTS mod stuff. It also had its own order management system so the original orders won't interfere with the scripted actions but still get tracked.

In the end lua scripting/sexps can get you the information you need and also provide the tools to make capships do any type of movement or shooting. Half of it can probably done with SEXPs alone nowadays. I think the lua interface is also able to load external modules so maybe new AI code can be integrated without changing the original AI code. That code is a mess, unless someone completely reworked that stuff within the last 6-7 years since I last added some AI features and made it even worse.
Title: Re: Fully 3D battlespace
Post by: 0rph3u5 on July 09, 2019, 05:41:25 am
If there is one thing I have learned from going back to the FS1 era recently, it is that you actually gain something for leaving the "overactive" capital ships and their role in FS2 and BP behind. In order to create spaces for player performance, reducing the role capital ship play in a mission might acutally a good thing.

Granted the follow-through is not always that easy. The sound and fury of the FS2 capital ships really is impressive, and therefor a hard tool to surrender, after all. (Not to mention approriate in some cases).

EDIT: added 2nd paragraph
Title: Re: Fully 3D battlespace
Post by: X3N0-Life-Form on July 09, 2019, 10:26:26 am
I can understand both sentiment. I feel the effort spent in FS2 to make them feel like something more than a big target to destroy or defend was well spent - I could spend the day listing all the positives that came with it, but it did cut into the amount of time spent on pure old-school dogfighting. Personally, I tend to lean more in favor of using capships. Outside their awesome factor, I feel that they are easier to build around than most other potential Targets of Interest - non-combattants are usually fragile, big space stations or disabled warships should probably be comparatively rare.

In the end though, capships are only one tool in the mission designer's toolbox, and FS2 itself tread rather carefully around them, and didn't hesitate to tweak them as the mission required. The Aeolus famously never makes an appearance at full power; there's quite a few TerSlash that get replaced by the weaker GreenBeam; the Rakshasa rarely appears with all three SReds; the Lilith only appears once; the Ravana, Sathanas and Hatshepsut are so powerful that most of their fights are thoroughly scripted to either wipe out their target instantly or to make sure that they don't.

You generally do not want to let warships do anything under their own control except for fire anti-fighter weapons. Everything else should be scripted.
I'm usually fine with them firing their big guns at will, but I certainly would recommend mission designers to not hesitate to beam/turret-lock them and go manual at dramatic moment, eg. simulate lucky shots/critical hits, decreasing performance as damage piles up, perform alpha strikes, or even script every shot in a given battle if necessary.


One of my dream goals for BP2 Act 4 is to have a fully consistent set of 'advanced' warship behaviors, unifying their jump charge, turret ROF, armor class, ECM state, and damage control into one coherent model that players can interact with and learn, rather than doing it on an ad-hoc basis per mission.
I think quite a few of us have had that dream :)
It was one of my underlying goals back when I started working on an ability manager many years ago, I wanted to be able to have all ships of certain types/variants be able to use BP-style abilities in any given mission if I wanted to, so that all that stuff would be somewhat consistent from mission to mission.
Title: Re: Fully 3D battlespace
Post by: Colt on July 09, 2019, 12:01:48 pm
The Aeolus famously never makes an appearance at full power;
Huh. Was it originally to have different weapons?

I'm usually fine with them firing their big guns at will, but I certainly would recommend mission designers to not hesitate to beam/turret-lock them and go manual at dramatic moment, eg. simulate lucky shots/critical hits, decreasing performance as damage piles up, perform alpha strikes, or even script every shot in a given battle if necessary.
So much this.
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 09, 2019, 12:14:31 pm
I'm usually fine with them firing their big guns at will, but I certainly would recommend mission designers to not hesitate to beam/turret-lock them and go manual at dramatic moment, eg. simulate lucky shots/critical hits, decreasing performance as damage piles up, perform alpha strikes, or even script every shot in a given battle if necessary.
So much this.

Try making cutscenes :o
Title: Re: Fully 3D battlespace
Post by: Colt on July 09, 2019, 12:20:22 pm
I'm usually fine with them firing their big guns at will, but I certainly would recommend mission designers to not hesitate to beam/turret-lock them and go manual at dramatic moment, eg. simulate lucky shots/critical hits, decreasing performance as damage piles up, perform alpha strikes, or even script every shot in a given battle if necessary.
So much this.

Try making cutscenes :o
Already a step ahead on that  :nod:
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 09, 2019, 01:01:01 pm
Details?
Title: Re: Fully 3D battlespace
Post by: Colt on July 09, 2019, 01:14:40 pm
Details?
Soon™.
Title: Re: Fully 3D battlespace
Post by: Nightmare on July 09, 2019, 01:20:25 pm
Soon

Good. I'm fine with that. :)



:mad:
Title: Re: Fully 3D battlespace
Post by: X3N0-Life-Form on July 09, 2019, 01:45:04 pm
The Aeolus famously never makes an appearance at full power;
Huh. Was it originally to have different weapons?
Honestly, I think either : A) they just didn't expect it to be a flak gun murder beast when they defined its default loadout, then tweaked it case by case when balancing out each individual mission, or B) flak guns weren't that powerful at the beginning, got buffed along the way, then playtesters pointed out that these things were killing everything.
Title: Re: Fully 3D battlespace
Post by: General Battuta on July 09, 2019, 06:01:38 pm
Plus retail AI had a random refire delay for turrets which made standard flak slightly less of a constant hose. Slightly.