Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Auto-Fire Accuracy Clutch  (Read 1306 times)

Goumindong

  • Admiral
  • *****
  • Posts: 1896
    • View Profile
Auto-Fire Accuracy Clutch
« on: April 14, 2020, 01:05:29 PM »

A few discussions recently(ok forever) have been talking about relative weapon value and also difficulty in getting weapons to shoot at the things that they should be shooting at. Most proposed solutions run up into balance issues or run into AI complexity issues.

The main problem is that both weapons and the AI needs to be generic enough to deal with randomized fits while also having as small a managerial impact on players. Players already have an advantage in the ability to make their own fits and prevent all randomization; giving them the advantage to being able to tweak individual weapon AI at the same time would make them that much more powerful while increasing the players managerial load*.

The obvious, oft proposed, and wrong answer to this is to tweak individual weapon AI that makes them ignore certain classes of targets when they're on auto-fire. But this has problems of its own. Weapons may need to fill multiple roles on different ships and they may need to fill those roles when on auto-fire. I've long used Assault Chainguns as anti-fighter on capital ships even before the buff. But a change that made them ignore fighters would impact my playstyle and a change that made them prioritize fighters would impact the playstyle of someone who wanted to use them with safety overrides.... It could also impact the effectiveness of a randomized ship that had AC's fit in its main slots while also fielding a lot of other PD type weapons. The AI could either think its all anti-fighter and so never close with an enemy thinking its unarmed. Or it might crash the boards and then not shoot at the target in front of its face because it was distracted.

There is a solution i think that can fix things in general without too much issue. It would make all ships much more combat effective and prevent a lot of bad AI behavior. And its an accuracy clutch**. When deciding whether or not to fire a weapon the AI would use more or less the same routines it currently uses with one exception. If its current targets available cross section is smaller than its current recoil adjusted accuracy by enough of a percentage it prevents the weapon from firing. What the percentage value would have to be to work i am not sure (different weapons could have different clutches but this would require more tweaking) but i am reasonably positive that this would fix a lot of issues players currently have with weapons and their behavior in the game

This has the advantages of

  • Allowing even highly inaccurate weapons to be used as point defense at significantly reduced DPS
  • Preventing highly inaccurate weapons from dumping flux at targets they cannot hit
  • Preventing ammo limited weapons from dumping rounds into the void
  • Continuing to allow highly agile ships to utilize their mobility to avoid fire
  • Allowing weapons to be more effectively balanced against various target types using accuracy, recoil, and shot velocity
  • Benefiting all ships evenly with minimal AI, managerial, and design overhead

Additionally (and not necessarily) this could make it easier to implement AI routines which do have a semblance of "smartness" to them. A clutched weapon might search for a new target that it would not be clutched against and a non-clutched weapon might shoot continually at the first target it acquired. In this way point defense/anti-fighter weapons wouldn't stop being anti-fighter as soon as a frigate showed up and would get less confused against fighters and other fast moving ships in general preferring to focus a target down rather than switch to whatever is closest.

Edit: As an example of how this would work. I assume that the game knows

A) The distance to the target ship (Because it reports this to the player)
B) The size of the target ships hit box (because it has to know both what its shooting at and that object must be loaded into memory)
C) The current accuracy angle of the weapon.(Because it reports this to the player by drawing it on the weapon)

If i know the distance to the target ship and the size of the target ship then then getting the angle of the arc of the target ship is simple using the inverse tangent of the radius of the ship/Distance and multiplying by 2. If you then divided by the current accuracy angle of the weapon this would give you a percentage equal to the amount of effective accuracy(as if shooting at an unmoving target). If that was say, lower than 50%, the weapon stops firing. If it was greater than 50% the weapon starts firing again. Weapons that fire in a burst could calculate based on the last bullet that the burst would fire(which should also be easy to figure). Oblate ships make things a little more complicated because they have variable presented sides. But the game could use the larger or the smaller radius of the oval without too much of an issue.(except for maybe the Odyssey)

As an example. Lets say that a HAG is shooting at a Medusa and the game has an accuracy clutch of 70%. The medusa is at 1000 range and (lets suppose) it has a radius of 50. Twice the inverse tangent of 50/1000 is equal to 5.72 degrees. So the HAG would shoot at the Medusa until such a time as as its accuracy angle was lower than 8.18 degrees. If the medusa moved closer, to 500 range, then the HAG would fire until its accuracy angle was 16.3 degrees. At max range(1400) the accuracy clutch would stop the weapon firing at 5.84 degrees.

The clutch isn't going to figure for projectile speed. Its still trying to lead the target as normal. So agile ships still get to avoid. Its just saying "if i shoot this what is the probability that i hit given that i accurately lead and the target continues its trajectory"? And if it comes up with "utter shite" it stops shooting.

*And this is bad. Think about a game like Divinity:OS and all the management you needed to do for all the characters in order to set up things how you wanted. Now instead think of a game like slay the spire, which has similar complexity in its deck building to D:OS's characters but enforces a lack of management except incrementally. Slay the Spire is an amazing game that is super easy to replay and Divinity:OS, while still a good game, is not easy to replay because its managerial load isnt constrained in a way that prevents it from becoming onerous.

**For those unaware of the term. "clutch" means to "grasp tightly" and is used in many different and seemingly disparate situations. A clutch in a car engages/disengages the transmission from the engine by "grasping tightly". A person who is clutch "grasps tightly to opportunity" in high pressure situations. To clutch a variable means to control that variable tightly. So in this situation the idea is that the weapon stops firing when its accuracy gets low in order to tightly control is accuracy.
« Last Edit: April 14, 2020, 03:26:05 PM by Goumindong »
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7222
  • Harpoon Affectionado
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #1 on: April 14, 2020, 01:15:16 PM »

This is an interesting idea. I have noticed that the continuous nature of full auto fire lowers effective DPS of recoil heavy weapons by a very large amount.
Logged

Terethall

  • Commander
  • ***
  • Posts: 157
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #2 on: April 14, 2020, 06:09:02 PM »

This is a really, really good idea. It might require rebalancing larger ships against smaller swarms, because right now one major way small ships take advantage of larger ones is that paragons will blow their autopulse load on mining pods and then die by a thousand cuts to an ensuing swarm. But Alex is already powering up small ships in the next release, and this is too good of an idea to pass up. It would also really improve the value of advanced turret gyros and the recoil-lowering skills, which I think lots of (newer) players overlook and don't fully understand, as medium ballistics enter their golden age.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #3 on: April 14, 2020, 08:37:35 PM »

I'll say, this is really interesting! My concern would be cases where it's not a good idea, but it would stop firing anyway, and there'd be nothing you can do about it. The way autofire is now, it's a control with very predictable behavior, and it doesn't try to be smart. By making it smarter, you could improve its performance, but that would also take away from its function as a control. If you want something to stop firing, at least you can turn off autofire or order the ship to hold fire. But if autofire can decide to stop firing when it *could* be firing, there's no control to override that.

For example, say you have enough combined firepower to saturate a smaller target, but each individual gun wouldn't fire continuously. Still... this is definitely food for thought. I like the idea in general, it seems elegant.
Logged

Goumindong

  • Admiral
  • *****
  • Posts: 1896
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #4 on: April 14, 2020, 09:31:23 PM »

I'll say, this is really interesting! My concern would be cases where it's not a good idea, but it would stop firing anyway, and there'd be nothing you can do about it. The way autofire is now, it's a control with very predictable behavior, and it doesn't try to be smart. By making it smarter, you could improve its performance, but that would also take away from its function as a control. If you want something to stop firing, at least you can turn off autofire or order the ship to hold fire. But if autofire can decide to stop firing when it *could* be firing, there's no control to override that.

For example, say you have enough combined firepower to saturate a smaller target, but each individual gun wouldn't fire continuously. Still... this is definitely food for thought. I like the idea in general, it seems elegant.

This concern makes sense but i don't think that such a thing would come to pass. The accuracy* of most weapons is such that even a high accuracy clutch would get at least some shots off the majority of targets. To prevent edge cases you could have a double check. By default weapons would not fire if the last shot in a burst would have a recoil compensated accuracy over the accuracy clutch. But they would always fire if they were at ideal accuracy.

As an example you can get yourself in a venture with ITU. Put a heavy autocannon in one turret and a heavy mortar in the other. Both of these weapons have perfect or almost perfect accuracy on the first shot(the first shot on the heavy mortar goes through the same point in the cursor every time so long as you stop to reset the recoil!). And they have decent to pretty decent accuracy on the second and third shots of their respective initial bursts too. If you stuck a fighter sized drone that didn't move out there each one would hit the fighter on the first shot. Almost certainly. Now hold down the trigger and we see that the bullets are flying all over the map with basically zero chance to hit. If a heavy mortar is able to hit a stationary fighter on the first shot at 1280 range then most other weapons aren't going to have an issue not firing.

With a 50% accuracy clutch that checked against the last shot in a burst these might not, but probably would still, fire against fighters at ~1280 range. But instead of continually firing at those fighters until they had no hope of hitting they would stop firing until their accuracy was ideal and then start firing again. So they would not "not fire" but would instead "fire less". With a double check even a very tight accuracy clutch would produce weapons that always fired at fighters at 1280 range even if they only fired after all recoil effects had been cleared and the weapon was at ideal accuracy again.

-----

Thinking about my secondary AI options i now realize they would not work, because there isn't a hard "on-off" relationship with an accuracy clutch. A weapon doesn't "stop firing" it starts "firing less often". But the pattern of shots depends on the structure/assumption of the clutch.

As an example. Suppose we're firing a weapon with a burst size of 1 that takes 4 shots to hit an accuracy clutch of 70%(at a stationary target at the same range). Each shot reduces final accuracy by 10%. We can compare two different routines 1) the weapon fires any time its accuracy is better than 70% 2) the weapon stops firing entirely until recoil is entirely reset upon hitting the clutch. For the first routine the weapon shoots at 100% accuracy, then 90% accuracy then 80% accuracy, then 70% accuracy. It waits for recoil to get down under 70% and fires again at 70% accuracy. After the initial 4 every shot is at 70% accuracy and so as the battle goes on accuracy tends to 70% unless minimum accuracy ends up better than the clutch. With the second clutch routine the weapon shoots at 100,90,80, and then 70 and resets, and shoots at 100,90, 80 and 70. Producing an average of 85% accuracy. Because recoil is linear per shot both of these routines spends the same amount of flux. But they make the battlefield perform differently.

Probably choosing a relatively tight clutch with a double check would make the most sense to keep things as close to they are now. You would get fewer wasted shots. Weapons that had bursts would fire in bursts. Weapons that had continual fire would fire continually but less often when they had poor accuracy

-----------

If you're concerned about situations when you could dump lead in the direction of a target and it makes sense to have zero concern for accuracy but your weapons won't it seems so much like an edge case its hard to see it existing. That only really happens when a ship is not under any pressure. A small ship would have to be at long range to a larger ship, which means they're not both really a threat to the larger ship and that the larger ship probably isn't much of a threat to it unless it decides to aggressively attack. If the smaller ship has taken damage and is attempting to retreat you're still probably better off shooting more accurately than less.

*Accuracy here referring to shooting a stationary target
« Last Edit: April 14, 2020, 09:40:24 PM by Goumindong »
Logged

TaLaR

  • Admiral
  • *****
  • Posts: 2794
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #5 on: April 14, 2020, 09:37:59 PM »

I think this shouldn't apply to firing at fighters - you aren't really trying to hit an individual fighter within a swarm, any of them would be good enough. Fighters also tend to have enough maneuverability to easily dodge a precisely fired projectile (even if they have no AI to do so intentionally), while saturating an area with projectiles is bound to eventually hit.
Logged

Goumindong

  • Admiral
  • *****
  • Posts: 1896
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #6 on: April 14, 2020, 09:46:04 PM »

I think this shouldn't apply to firing at fighters - you aren't really trying to hit an individual fighter within a swarm, any of them would be good enough. Fighters also tend to have enough maneuverability to easily dodge a precisely fired projectile (even if they have no AI to do so intentionally), while saturating an area with projectiles is bound to eventually hit.

Kind of true. But fighters are so fast they're going to avoid a blob of fire just as much as precise shots. I only find very short ranged weapons(which are unlikely to get clutched) and manual firing to be effective at cleaning up a blob anyway so i think the impact would be minimal.

Edit: Thinking about the edge case again. The AI could turn the clutch off in situations where the "strike" tag would apply. So when you might consider overwhelming fire (shields down get all fire on that target immediately!) the AI would turn the clutch off and continue firing. When that was no longer reasonable it would re-engage. Similarly there could be a single button clutch toggle for the auto fire for player piloted ships.
« Last Edit: April 14, 2020, 09:57:24 PM by Goumindong »
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #7 on: April 15, 2020, 03:00:32 PM »

There are some edge cases to this; the one that comes to mind for me is vulcan point defense guns: they work because of their inaccuracy.  If you took a vulcan cannon and gave it perfect accuracy, it'd perfectly miss an orbiting salamander.  The inaccuracy combined with the high dps is what lets it saturate a volume of space and get hits in.

Edit: similarly, long-range weapons fire at highly mobile frigates is another case where some inaccuracy can be a good trait.
« Last Edit: April 15, 2020, 03:03:44 PM by Wyvern »
Logged
Wyvern is 100% correct about the math.

Astyanax

  • Ensign
  • *
  • Posts: 32
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #8 on: April 15, 2020, 05:45:56 PM »

Maybe exempt PD tagged weapons from clutching?
Logged

Goumindong

  • Admiral
  • *****
  • Posts: 1896
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #9 on: April 15, 2020, 10:27:44 PM »

In general PD isn't going to have as much of an issue and can benefit because

1) when not firing weapon tracking is better
2) the arc-length of close weapons is particularly high

I think that, in general the fewer shots and less flux expended against targets further away would be better. Though it is possible to except weapon types from the clutch
Logged

Megas

  • Admiral
  • *****
  • Posts: 12159
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #10 on: April 16, 2020, 07:34:05 AM »

Some weapon inaccuracy is also effective against player piloting small, fragile twitch ships, because player cannot predict where shots will go.  Makes dodging harder.

In classic Doom, invisibility is a powerup that usually hurt the character because it randomized aim of enemies.  Humans with hitscan guns, invisibility is good.  Fireball chucking demons (especially the cyberdemon), invisibility is terrible because player cannot predict where shots would go, and could sidestep into a fireball or rocket.
Logged

Goumindong

  • Admiral
  • *****
  • Posts: 1896
    • View Profile
Re: Auto-Fire Accuracy Clutch
« Reply #11 on: April 16, 2020, 12:01:08 PM »

I would not consider the side effect that smaller/more agile ships were able to more consistently avoid fire(especially player ships) by utilizing their agility to be a terribly bad thing. Especially if this was a variance issue rather than a average issue. *

However i doubt that is particularly true. The plasma cannon, with its perfect accuracy and zero recoil, is not bad at hiting/killing small/agile ships compared to an autopulse laser(or two to maintain the relative dps once the burst is over). So i suspect that the clutch would do the opposite especially as multiple ships started to overlap fields of fire. Innacurate fire from one direction may be harder to avoid but inaccurate fire from two or three directions is far less lethal than accurate fire.

*reducing variance for the player has a some side effects of making it easier to judge what you can and cannot take on as well as allowing you to push much closer to your difficulty boundaries. Imagine if a game is “youve got to roll this dice and have it come as close to but not go over the target number” and before you roll you can add anything to the dice roll you wanted. If your dice is large then youre more or less stuck choosing a number far away from your target. And if your dice is small then you choose a number closer. This of course isnt a terribly fun game but if we let player skill skill determine the number you choose then the smaller die allows a much greater range. And a larger die means that highly skilled players dont get to utilize the full extent of their skills since they must self limit rather than pushing boundaries.

Another example might be to imagine a doom speedrun. Rockets do the same amount if damage every time based on hiw close/far away you are. This means that you can determine, based on your health and skill, whether or not a particular jump works as a time saving device. If the damage is highly variable this goes out the window and the speed run becomes less an aspect of skill and mastery and more an aspect of how lucky you got rolling the rocket jump dice.
« Last Edit: April 16, 2020, 12:11:02 PM by Goumindong »
Logged