Author Topic: Dogfights/strafing/ship movement other than standoff planned?  (Read 6761 times)

Offline swizzlewizzle

  • Newbie Mark III
  • *
  • Posts: 43
I'm wondering... are any automated ship movements planned for the initial versions of AI war 2?

What I mean by that is.. ships moving around eachother while firing.. fighter dogfights, etc... Or will it be all ships getting into range and then just sitting there unloading their weapons?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #1 on: April 21, 2017, 02:46:11 pm »
It depends on what you mean, exactly.  For squads themselves, they wouldn't be doing any auto-maneuvering any more than happened in Classic.  I'm not sure if auto-kiting will be a thing, but that's a question for Keith.

Within squads, though, they'll be buzzing around like little swarms in snowglobes to some extent, and able to switch between formations for travel (more steady like now, for the humans), versus sitting idle (moving slowly for humans, but still moving), versus fighting (lots of fast motions and whatnot like the trailers in the kickstarter).

Generally speaking, when it comes to individual ships doing things like apparent strafing runs or whatnot, there's nothing that complex going on.  What we are doing creates a lot of sense of motion, and you get more sense of barrages and so on, but it's not true ship tactics like you'd see in Freespace or something that's an actual dogfighting game.  The underlying simulation here is doing already what it will do at the end, and the stuff on top is just visual fluff.

With the scale that battles can get to here, there's not any consumer computer available that could run true dogfights in realtime in my opinion -- at least not without a lot of pre-scripting, etc.

It should be pretty fun to look at, and hopefully listen to. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline swizzlewizzle

  • Newbie Mark III
  • *
  • Posts: 43
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #2 on: June 13, 2017, 03:24:29 am »
Sorry to be unclear. :)

Basically what I meant by "dogfighting" visuals is that, instead of the snow-globe-like movement of fighters happening, and then the "globe" just sitting at standoff range firing away (never seen fighters do that hehe), ideally what would happen is that they do their snowball globe dance *together with* other ships.

Basically a system similar to what is done in Star Wars: Empire at War for their starfighters (i'm sure you have played it?).

The idea is that fighters can all "join in" to a big dogfighting furball. Really it's just fighters flying around randomly shooting off their weapons at random targets - something similar could be done in AI war 2.

Especially for "fighter class" ships, that you would expect need to get up nice and close to "dogfight" and fire their weapons, perhaps they would simply all get into the same location and just swarm around eachother making a big mess of a dogfight. :)

Additionally, the same sort of behavior could be used with larger ships, so that, instead of now, where you have the fighters/bombers sitting at a few KM away firing their weapons, you could have them "dancing" around the bigger ships and firing off weapons like that. From the simulation's perspective, they are basically just firing from low or point blank range, but visually it would look like they are flying around, dancing and taking pot shots.

I know in classic AI war, all of the ships simply go to range and fire away... perhaps this would be a slight change to that, at least for the smallest ships?

I guess I mainly ask because it's just strange to see "fighter" class vessels shooting from standoff range and sitting there... bring in the epic dogfights instead! :)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #3 on: June 13, 2017, 09:50:41 am »
I love Star Wars: Empire At War, but they're dealing with an order of magnitude fewer units, which makes a huge difference.  On present-day hardware you can't have detailed individual-ship simulations like that in realtime and so many ships.  Maybe in another decade!  Even then, it's a CPU-dependent issue, and we're extremely good at what we do with that.  The 3D visuals have nothing to do with the limiting factor here -- we could simulate the most costly parts of strafing runs on the GPU at this point, if we had the spare CPU cycles to tell them where to go.

There's a lot of matrix math and trigonometry that goes into things like strafing runs that look good, and those in turn involve square roots, which are extremely costly for CPUs to calculate.  Square root calculation is an iterative process at best, and even with our own version of the function where we shave off some accuracy in exchange for speed, and where we use trig lookup tables to avoid some costs there on sin and cos and such, there's just only so much you can do.  Matrix math involves a shedload of multiplications that simply can't be avoided, and even with my optimizations on THAT front, it's just not remotely enough.

From a simulation standpoint, I think we push all the cores of your CPU and GPU like almost no other game.  Yeah there are other intense game simulations and other game simulations that are substantially more complex, but they don't tend to make use of every last resource your computer has like we're doing at this point.  It becomes simply a matter of how much math a CPU can run in a millisecond, and there are just really definite limits on that.

If there was a dedicated floating-point coprocessor, or if we were using CUDA or similar to run simulation logic on the GPU (CommandBuffers in unity let us do exactly that if we wanted to, incidentally, across AMD and nVidia cards, but it requires extremely recent GPUs to do and so we can't feasibly use it).  Anyhow, even if we were using some sort of specialized math-centric program like that, we'd get into issues of sync across network games.  We need fixed-int math for the core simulation, because even over fiber connections there's just only so much data that you can push per second, so we're limited at core to the premise of lock-step simulations (like most other RTS games, but not action games).

I can't imagine that there are going to be any dedicated fixed-int processors out there anytime in the future, since that's a pretty niche need.  For most of our non-sim math, floating-point is where it's at, and that's true for most other things-a-computer-wants-to-do.  But to have that be consistent between players, they'd need to have the same OS to an extent, same hardware to an extent, etc.  The drift that gets introduced is incredibly small, and so doesn't even get noticed for half an hour or so of gametime until things suddenly fall apart because some ship dies on one machine but not another.

A running "sync ship states" process could be introduced that throttles that data transfer over the network, but then you'd still have edge cases where it didn't take a half an hour for things to implode.  And when those bug reports come through, we'd simply have to say "yeah, that's going to happen sometimes.  Just reload and move on, sorry, there's nothing we can do about it."  And people get pissed.  Why aren't we better at our jobs? ;)  So that's not really a compromise we can make.

Empire At War was really fun, but it was also single-player that I recall.  Man does that make a difference, too.  Tiny battles in single player?  Sign me up for that simulation! ;)  We actually did that sort of thing in The Last Federation in terms of then using full floating-point math in the simulation (IIRC), and certainly using a lot more trig and simulation per-ship either way.  That was super fun!  I really enjoyed working on that sort of thing, and I think Keith did also.  But that's one reason among several that game doesn't have multiplayer (the game design itself also just doesn't lend itself to multiplayer).

Summing up:
1. I'm totally with you that that would be awesome.
2. However, the sheer scale here, and multiplayer, combine to kill that.

Wish I had better news!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #4 on: June 13, 2017, 01:54:52 pm »
EAW had multiplayer, but like you said it had way fewer units.

Why would this involve fixed-int sim math, btw, as opposed to strictly vis-layer stuff?
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #5 on: June 13, 2017, 03:19:05 pm »
Why would this involve fixed-int sim math, btw, as opposed to strictly vis-layer stuff?

Because I'm under the general assumption that that level of logic would need to be handled at the sim layer rather than the vis layer to not have ongoing issues.  I could be wrong, though. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #6 on: June 13, 2017, 05:12:58 pm »
Why would this involve fixed-int sim math, btw, as opposed to strictly vis-layer stuff?

Because I'm under the general assumption that that level of logic would need to be handled at the sim layer rather than the vis layer to not have ongoing issues.  I could be wrong, though. :)
It depends on what you mean. Right now, aside from a few melee-range ships recently added, ships fire from ranges waaaaaay wider than their squad "bounding circle". As a result it doesn't really make sense for two opposing squads to "merge" into a dogfight. Especially with shots travelling so much faster than ships.

For melee ships, especially melee-vs-melee, it makes more sense. The idea (and actually the implementation under the hood right now) is that those ships actually have extremely short-ranged ranged weapons. Since they're actually closing to within bounding-circles-touching range (or nearly-so) the sim could notify the vis-layer that the two squads were "engaged" in that sense, and you could do whatever with that information.

But ultimately the game doesn't focus on melee range, so I don't know how big a benefit there is in making really cool animations for that subset. Theoretically the ranges of everything could be greatly reduced such that fighters and bombers were both melee-ish, but I think that would be a very different game.

Possibly "Fighter" is a misnomer for "evasive mobile platform that fires armor-piercing shells", and it would look more correct firing short-range guided-missiles, but then it's kind of horning in on the missile corvette, etc.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #7 on: June 13, 2017, 06:03:29 pm »
All of those observations make sense to me, yes.  And if I had two engaged squads, I could make them follow spline paths into one another, yeah.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline swizzlewizzle

  • Newbie Mark III
  • *
  • Posts: 43
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #8 on: June 21, 2017, 03:51:46 am »
First off, Chris, Keith, i'm very thankful for all of the time spent in taking this idea and really thinking about it. Definitely not a lot of developers who interact with their communities in that way, and i'm glad to have backed your game.

I think Keith is on target with what I was trying to get across with my initial post (which I admit may not have been very clear in what I was actually asking - sorry about that ^^).

Basically, exactly as you have just said in your recent post, if you could just modify the vis-layer to have "melee" or point-blank range ships spline around eachother, just to simulate them getting all close and pew-pew-like, that would be perfect. Especially for a mod doing fighter combat similar to what you see in star wars (and EAW, visuals only ^^), star fighters could all be set to be point blank or near point blank range, and then any mod could just tap into this spline system to have their tie fighters and x-wings flying around eachother doing the pew-pew. ;)

On the simulation layer, you just have two squads firing point blank at each other, but visually, you get something that looks somewhat like a dogfight.

If this could be snuck into early access or v1.0, well, it'd be great.

Anyways, thanks again and looking forward to getting some modding done. ;)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Dogfights/strafing/ship movement other than standoff planned?
« Reply #9 on: June 21, 2017, 10:27:15 am »
It's always a possibility down the line, but at the moment we're already over budget quite a bit for 1.0, so can't sneak in much extra right now.  On the plus side, we have an approach for how we could handle this if we have more flexibility down the road. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!