Author Topic: Weird beam weapon logic  (Read 1480 times)

Offline Lancefighter

  • Core Member
  • *****
  • Posts: 2,440
Weird beam weapon logic
« on: November 16, 2010, 03:27:09 am »
I noticed earlier today in a multiplayer game some weird things happening with the spire beam weapons, mostly related to lag..

As we all know, lines have both a starting position and an ending position. Generally, the start is a stationary weapon, the heavy beam cannon, or a relatively slow/stopped unit projecting firepower. Say, your group of spire frigates shooting stuff. The end of that line is a target - it is often a point in space, if the damage delivered is greater than the target's hp. However, some of the time, the end of the line is ANOTHER ship.

Now, these ships generally can move. Sometimes, quite rapidly - a logistics boosted spire frigate can easily hit speeds above 50, not to mention the double by normal speed, and the double by ishuman. By comparison, a hybrid moves at 50..

Thusly, there are times when your spire frigate, moving at incredifast, fires at a hybrid moving at notthatsloweither. The beam lasts for perhaps a mere fraction of a second, but that is often enough to cover WIDE tracts of space... Now, add in a bit of multiplayer lag, which seems to increase the length of beam draws for some reason, and you have a fairly interesting scenario:
I at one point, observed my spire frigate firing at empty space while moving at its 'normal' speed. It hit a target, with the other end of the draw ending out in space somewhere. However, because it was moving, the beam continued on to sweep across space, hitting at least a half dozen missile frigates, and killing each.

Now, I have absolutely no clue how much of this is reproducible, etc, nor how easily it could be done..... Nor do I have any clue what the actual mechanics are coming into play here.

However, it looks pretty damn cool.

(except for the whole 'beam termination point is pivot point' that just kinda looks weird)

And of final note: I'm not really sure what the expected mechanic at play is here. Is it done 'properly'? i was under the assumption that damage was only ever calculated once on a beamweapon.. Clearly I was wrong


edit!
Now with VIDEO, courtesy of machine's 'ill randomly record things' habit ;)

http://www.youtube.com/watch?v=wqU6QhWLr-E#t=5m16s

check out the bottom right blob of units, a bit above those, a slightly thinner group of units... that get swept by with beam weapons. You might miss it if you arent looking in the right place at the right time, you may want to watch it a few times
« Last Edit: November 16, 2010, 03:39:25 am by Lancefighter »
Ideas? Suggestions? Concerns? Bugs to be squashed? Report them on the Mantis Bugtracker!

Author of the Dyson Project and the Spire Gambit

Offline orzelek

  • Hero Member Mark III
  • *****
  • Posts: 1,096
Re: Weird beam weapon logic
« Reply #1 on: November 16, 2010, 05:17:45 am »
I vaguely remember keith mentioning something about modification to beam weapons logic. It seems to be in for 4.034.

They seem to shoot more like pulse lasers now - with drawback being the fact that hitting a target that is moving with large transversal is not exactly their strong point - beam will pulse few times but unit has already flown away. No idea how the damage is applied tho - had only a little bit of time.

I only checked what happens when target is moving - not what happens when firing unit is moving.

TheMachineIsSentient

  • Guest
Re: Weird beam weapon logic
« Reply #2 on: November 16, 2010, 08:54:20 am »
It was really cool. And it differentiates them from sniper turret shots. Please don't "fix" it. :)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Weird beam weapon logic
« Reply #3 on: November 16, 2010, 09:06:57 am »
Ok, well, with how badly my little frigates-increasing-event-attack-counter-before-first-hub indiscretion messed with you guys last night, I'll overlook the fact that you completely missed several big hints I dropped plus the the _release notes_ ;)

Quote
** Spire frigate, destroyer, and cruiser main weapons changed from Heavy Beam Cannons to a new beam mechanic (currently called "Photon Bombardment Cannon", though not all tooltips may indicate this).
*** These look pretty similar to a single-beam HBC, but instead of applying all their damage in one frame they apply it over about 2 game seconds, doing damage every frame, but the beam endpoint cannot change during firing.  This makes it much easier to apply full damage at a longer range than the fan-of-beams based HBCs, but it is also possible for the target to move out of the beam during those 2 seconds.  It behaves similar to an HBC in that it hits whatever is along the actual line of fire, and closest to the firing ship, and continues through any targets destroyed by the damage.
*** Note that the heavy beam cannon modules mounted by Spire ships are still HBCs, only the main guns are now PBCs.  There may be some PBC modules for the higher capital ships later on.
** Along with the mechanic change, the Spire capital ship main-guns now have a firing cycle time of about 10 seconds instead of 5 seconds, and do about 4x as much damage as they used to (2x to compensate for the reload time change, 2x to compensate for the mechanic change that makes it very much more anti-big-target).

Glad you like it.  I do still need to fix the pivoting-while-firing-ship-moves problem.  I mean, it's not strictly a problem, but it looks weird and goes against the thematic idea that it's supposed to be locked into a specific angle while firing.

And yes, it applies damage per frame, the total damage applied is the listed power.

And yes, the cruiser's PBC really does do 3,000,000 damage.
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 orzelek

  • Hero Member Mark III
  • *****
  • Posts: 1,096
Re: Weird beam weapon logic
« Reply #4 on: November 16, 2010, 10:02:06 am »
I also think that mechanic looks cool.

Main question for me would be if it's intended to track target while pulsing or not? Since currently it shots at targets place and remains like that even after target went away.

Second thing: is that damage applied to first unit thats hit or to all units along the beam... ?

Offline zebramatt

  • Master Member Mark II
  • *****
  • Posts: 1,574
Re: Weird beam weapon logic
« Reply #5 on: November 16, 2010, 10:21:56 am »
I also think that mechanic looks cool.

Main question for me would be if it's intended to track target while pulsing or not? Since currently it shots at targets place and remains like that even after target went away.

Short answer, current functionality is by design.

Slightly longer answer, from above:

Quote
...the beam endpoint cannot change during firing... but it is also possible for the target to move out of the beam during those 2 seconds.

Second thing: is that damage applied to first unit thats hit or to all units along the beam... ?

Short answer, the latter.

Slightly longer answer, from above:

Quote
instead of applying all their damage in one frame they apply it over about 2 game seconds, doing damage every frame... it hits whatever is along the actual line of fire, and closest to the firing ship, and continues through any targets destroyed by the damage.

Offline orzelek

  • Hero Member Mark III
  • *****
  • Posts: 1,096
Re: Weird beam weapon logic
« Reply #6 on: November 16, 2010, 10:36:50 am »
zebramatt I know that Lance mentioned this - my questions are aimed at keith mainly to figure out if current working is as intended or not.

He already added that he needs to fix the origin point for beam and pivoting - I'm curious if he wants to fix the ending point also.

My guess is that beam would damage only first ship on it's path.. thats why I asked second question.
If what keith means by damage per frame is applied to all ships on the path it could be awesome.. and very powerful.

PS.
I can't verify it by myself currently...

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Weird beam weapon logic
« Reply #7 on: November 16, 2010, 11:26:48 am »
Quote
zebramatt I know that Lance mentioned this - my questions are aimed at keith mainly to figure out if current working is as intended or not.
Well, he was quoting me ;)

Anyway:

When I'm done with it the end-point will remain stationary relative to the firing ship, so it will move exactly the same dx/dy as the firing ship if the firing ship is moving.

It is not intended to track the primary target if the primary target moves during the firing cycle; the next shot (roughly 10 seconds after the start of the first firing) will be at the then-location of the primary target.

The damage is applied per-frame, but it's the listed damage divided by the number of frames so it only does the full damage if there's no other hittable targets in the way and the target doesn't move out of the beam.  This is compensated by having a stupidly high listed damage :)
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 orzelek

  • Hero Member Mark III
  • *****
  • Posts: 1,096
Re: Weird beam weapon logic
« Reply #8 on: November 16, 2010, 12:36:39 pm »
Thanks for clarifications.. and sorry for confusion I was at work ;)

Your idea to fix end point is I think strange one - gun fixed at certain angle constantly firing - like it can't track when fire sequence is in progress.

I would think that beings like Spire can actually create a guns that can track their target correctly... :D

Unless trying to track primary target would be overly CPU consuming.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Weird beam weapon logic
« Reply #9 on: November 16, 2010, 12:52:29 pm »
Well, thematically the problem isn't that they can't track the target, the problem is that the cannon emplacement cannot change angle while the energy is being poured through it.  Could result in a breach and blow something up, etc.

Normally that's not a problem, and the heavy beam cannon modules you can slap on the ships don't suffer from this problem (they're single-frame shots anyway).  But the Photon Bombardment Cannons are so stupidly powerful that you have to be pretty careful when firing one ;)

If I could restrict the firing angle to something spinal-mount-like, I would ;)  But there's no system for that, and it would be excruciating to get the AI and auto-behavior, etc, to properly account for firing arcs, so this is where it is.

Balance-wise if they tracked the primary target I'd need to nerf the damage back down to HBC levels.  The current way allows them to be even more effective against big stuff, stationary stuff, stuff likely to be on a parallel course, etc.  But also less effective against small stuff.  In general, the spire stuff is supposed to have difficulty dealing with large numbers of small attackers (particularly bombers), making them work really well with human fleet ships, Riots, 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 Lancefighter

  • Core Member
  • *****
  • Posts: 2,440
Re: Weird beam weapon logic
« Reply #10 on: November 16, 2010, 02:03:11 pm »
somehow, i did manage to totally miss that part of the patchnotes..

Oh well.

It will be considerably more interesting when the beams maintain the endpoint relative to the ship, but i will ask: will that only ever be relative to the ship's position, or are you also planning on messing with orientation as well?
Ideas? Suggestions? Concerns? Bugs to be squashed? Report them on the Mantis Bugtracker!

Author of the Dyson Project and the Spire Gambit

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Weird beam weapon logic
« Reply #11 on: November 16, 2010, 02:29:26 pm »
Just position.  Going with angle of orientation would overly encourage microing of orientation, which is neither something we want to encourage nor easily accomplished via the interface.

So yea, it will only have a loose connection with the concept of "making sense", but it is a continuous beam weapon, and therefore cool ;)
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 Lancefighter

  • Core Member
  • *****
  • Posts: 2,440
Re: Weird beam weapon logic
« Reply #12 on: November 16, 2010, 02:31:31 pm »
yeah, I can see that.

Perhaps you could also work out that idea for a laser grid of some sort, using the same mechanics?  ;)
Ideas? Suggestions? Concerns? Bugs to be squashed? Report them on the Mantis Bugtracker!

Author of the Dyson Project and the Spire Gambit

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Weird beam weapon logic
« Reply #13 on: November 16, 2010, 02:36:45 pm »
Well, it could be done, but I'm not sure it would be a good idea.  This new continuous-beam mechanic is _fantastically_ high in cpu cost compared to a normal shot (though not bad considering what it's doing).  It's just ok because you've got so few of them in a game and they're only firing 1/5 of the time and only in combat.  If a laser grid was always-on and/or had multiple beams per weapon, etc, it could just get to be not worth the cpu.
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 Lancefighter

  • Core Member
  • *****
  • Posts: 2,440
Re: Weird beam weapon logic
« Reply #14 on: November 16, 2010, 02:39:07 pm »
ouch.. I figured itd be bad, as itd have to check intersections along the beam length many times, but I didn't particularly think itd be /that/ bad.

(well, it wouldnt have to be always on, just on when hostiles are on the planet, and even then only pulsing.. but yeah i get what your saying, its probably a bad idea cpuwise)
Ideas? Suggestions? Concerns? Bugs to be squashed? Report them on the Mantis Bugtracker!

Author of the Dyson Project and the Spire Gambit