Author Topic: Ship weapon GFX & multiple ship weapons  (Read 1221 times)

Offline swizzlewizzle

  • Newbie Mark III
  • *
  • Posts: 34
Re: Ship weapon GFX & multiple ship weapons
« Reply #15 on: January 23, 2018, 08:58:52 AM »
That's great to hear Keith. I actually didn't know the drones would return, haha. Support for a single type of "drone" currently i'm assuming from looking at the code?

Seems my wish list is only the visual fighter dogfight "tangles" then. ;)

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,231
Re: Ship weapon GFX & multiple ship weapons
« Reply #16 on: January 23, 2018, 10:00:37 AM »
Couple of comments:

- Regarding orientations for emission points, there's not really a reason for that unless we're planning on having shots automatically do some amount of "firing forward out of the gun before bending to the target."  Right now they come out of a point and then head toward their target in the fashion that is literally mimicking  that of the underlying shot in sim code.

- THAT said, if you're talking about orientations because you'd want it to check and fire from specific guns depending on where the target is... that's actually pretty cool of an idea, really.  Basically if there are guns on the front and guns on the sides and back, then it choose between them, sure.  The orientation would still be really tough to do, though, because that's a lot more math and I'm worried about the CPU expense there. 

-- Instead I'd rather go with which emission point is closest to the target, since assumedly that would be the one that is facing the target.  For some of the big forward-facing guns in particular that would be wrong, though, so if there was a secondary offset I'd say it would be "for choosing-a-specific-firing-source" purposes, pretend I'm actually in this offset location from where I am now.  That ought to handle all of the cases in the lowest-possible CPU usage way.

Quote
Fighter dogfight tangles (as I posted a few months back where I think you guys were talking about possible solutions) -- basically, allowing fighters and other small ships to visually "look" like they are not just sitting in front of eachother blasting away as if they were capital ships. (evasion-based ships should evade, no?)

This one is completely out of scope at this point, and I don't have any ideas on how to implement this in a way that won't grind the CPU to a halt.  There's simply too many transforms that would have to change.  I've thought about some ways to implement the movement on the GPU, but while doing the calculations as just vector math on a secondary thread on the CPU, but I can't think of a good way to handle the rotation transforms of vertices in HLSL shader code.  There are some ways to do it, but I'm trying to stay away from compute shaders (which require newer hardware), and I'm not sure how efficient such code is in general.

I could see this being possible in a year or two, as hardware marches forward and the underlying unity engine adds further performance improvements in transform updates.  As they continue to roll out their newer custom render pipeline scripting stuff, that will be one big help, too, because at some point I may rewrite the entire transform stack for ships to instead be all virtual and then just using arrays of offsets to their GPU instancing code, which is vastly simplified if the render pipeline scripting is under my control.

However, they haven't opened up the occlusion culling -- specific frustum culling -- fully yet in that part of their code, and the whole custom scriptable render pipeline stuff is still in an alpha state at the moment as a general concept, so I definitely wouldn't be building a real game on that just yet.  But my understanding is that that's supposed to hit release-readiness sometime in 2018, and I'd guess further maturity in 2019, so a lot of new things would become possible once that's done.  For my purposes, it should allow for vastly more throughput of ship movement calculations in the vis layer without any extra hardware requirements.

But until then, the tangling of dogfights is definitely Right Out at this point.  I thought I'd be able to handle it, but the performance and flexibility just isn't there yet in the underlying engine stack.  There's too much bloat unrelated to what I am doing, basically.
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: Ship weapon GFX & multiple ship weapons
« Reply #17 on: January 23, 2018, 10:11:49 AM »
That's great to hear Keith. I actually didn't know the drones would return, haha. Support for a single type of "drone" currently i'm assuming from looking at the code?
The carrier produces both fighter and bomber drones. I think it's via a BuildMenu xml entry. It'd probably only be about 15 minutes of xml work to add a drone variant of another fleet ships and stuff them into the same build-menu entry and the carrier would start cranking them out.

It might even respect tech unlocks, I'm not sure. So getting a Lightning Corvette bonus ship type from an ARS would lead to your carriers automatically producing lightning corvette drones if they were defined, though "corvette drone" sounds kind of contradictory. Maybe just call them lightning drones.

That said, since you can't directly control a carrier's build queue in-game, having it get diluted with your bonus picks during the game might be undesirable for the vanilla game.
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 Park, Arcen Games Founder and Lead Designer
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,231
Re: Ship weapon GFX & multiple ship weapons
« Reply #18 on: January 23, 2018, 12:57:47 PM »
On the subject of multiple emission points, I was going to have to implement this anyhow because of some of the sub-squad optimizations I plan on making.
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: 34
Re: Ship weapon GFX & multiple ship weapons
« Reply #19 on: January 23, 2018, 07:26:46 PM »
Chris since this would be purely visual, couldent you just implement a LOD system where if the main camera is close to the action, he sees the fighter tangles, but when far away, would not see anything, or perhaps even a “dogfighting” icon? Since this would only apply to small ships at very close range, it seems you would never have to render a very large number of tangles?

And for super massive dogfights, at a certain limit, you could just hide ships after a certain point, where the representation to the player is probably the same anyways.

Seems to me going this route would be fairly easy, and solve any performance problems. ;)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Ship weapon GFX & multiple ship weapons
« Reply #20 on: January 23, 2018, 07:40:44 PM »
There are various ways to throttle it, yes. But the dev time to get the dogfights working is still an issue.

Also, bear in mind that only melee ships would really apply to this. Even short-ranged weapons fire at over 8 times the "width" of a normal squad. It would look weird for fighters to suddenly animate with something that far away.

Edit: also, the mouse detection on ships relies on the transform tree, which cannot be efficiently created and destroyed as the squad passes into and out of the level-of-detail zones. One day our mouse detection may change enough that this won't be an issue, but that's not today.
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 Park, Arcen Games Founder and Lead Designer
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,231
Re: Ship weapon GFX & multiple ship weapons
« Reply #21 on: January 23, 2018, 08:07:54 PM »
Yep, all of those things.  It's also very common that you'd be in range enough to see LOTS of small dogfights at once if you were seeing any at all, and the performance would suddenly tank.
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: 34
Re: Ship weapon GFX & multiple ship weapons
« Reply #22 on: January 23, 2018, 10:46:28 PM »
Gotcha.. a bit sad to hear.. fighters/etc lining up to blast away at each other is the only visually disgusting I have seen in the game.

Hope someday something a bit nicer can be added. :)

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,231
Re: Ship weapon GFX & multiple ship weapons
« Reply #23 on: January 24, 2018, 07:07:19 PM »
We shall see!  It would be nice, although fairly complex.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!