Make AMS pre-calculated

    Good idea?

    • Yes

      Votes: 9 60.0%
    • No

      Votes: 6 40.0%

    • Total voters
      15
    Joined
    Sep 14, 2017
    Messages
    666
    Reaction score
    928
    So, Weapons 3.0 brought use some serious projectile speed optimizations, which are pretty cool, but in the process, AMS seems to be broken. My first assumption was that this was just an issue with AI not working, but based on various observations, I believe it is a side effect of how fast things are. Turrets often do not seem to be able to track fast enough to follow a missile, and even if they could, there is the secondary issue of lag displacement being massively amplified at higher speeds.

    What this means is that in the past, if X amount of lag would cause a cannon's trajectory to have +/- 2m margin of error, with things moving 10x as fast, that same amount of lag creates a +/- 20m margin of error making everything miss wildly.

    The idea here is to make AMS a pre-calculated hit/miss probability rather than follow true intercept physics. Instead of cannon-cannon turrets being AMS, make a new weapon primitive called AMS that will fire at missiles (and maybe mines?). It would look like a cannon-cannon or possibly a beam, but instead function very differently. Basically, if a missile is within its gimbal area, you just calculate a chance to hit based on how far away it is... you either hit, or you don't. With bullets and missiles both flying around at mach-26, no one is going to actually be able to tell if those bullet graphics are actually hitting the missiles or not anyway.

    Appart from fixing the accuracy issues, this should also see a massive improvement in game performance since you only need to calculate to hit once between one output and one missile instead of having to run continuous hit tests for as long as each bullet is in the air.

    [EDIT] After further consideration, I feel a specialized weapon block is likely unnecessary. This behavior could instead be initialized by the AI as an alternate behavior when firing at blockless entities: missiles, bombs, mines, etc.
     
    Last edited:
    Joined
    Jul 30, 2013
    Messages
    195
    Reaction score
    84
    • Legacy Citizen 4
    First off. Schema himself has said that it wasn't a tracking issue but an issue with the missiles having glitched-high health. Meaning the missile HP was so high the AMS couldn't kill them. This has been fixed.

    Secondly. No. Just no. This is a terrible idea I'm sorry. I respect you Nosa, I love lots of your ideas, but not this.

    AMS turrets do fine. They track fine. And As far as I can tell in my tests they were hitting just fine under the new weapons update.

    Doing some sort of silly calculation with a new block is gonna take up and ID with a really silly block when that was being handled just fine by AMS turrets, and I don't think this would actually lead to any significant optimazations at all. In fact, I think it would just make it worse.

    For Schema to do this he would also have to write an entirely new bit of code to do just this. which is really silly when the AMS turret system works just fine.

    Also. If you do this then there is absolutely zero point to designing different types of AMS turrets and could very easily lead to a scenario where these things are just AoE AMS despite your gimbal bit.

    Also, a probability system, seriously? That's just a hidden dice-rolling game beneath the surface. That isn't fun. That doesn't have any design choices like where to put the turrets associated with it. That doesn't have any choices related to what turret to use associated with it. What if I wanna use a fast tracking beam turret as my AMS and have it double as an anti-fighter weapon?

    Just no. So much no.
     
    Joined
    May 14, 2018
    Messages
    22
    Reaction score
    22
    First off. Schema himself has said that it wasn't a tracking issue but an issue with the missiles having glitched-high health. Meaning the missile HP was so high the AMS couldn't kill them. This has been fixed.

    Secondly. No. Just no. This is a terrible idea I'm sorry. I respect you Nosa, I love lots of your ideas, but not this.

    AMS turrets do fine. They track fine. And As far as I can tell in my tests they were hitting just fine under the new weapons update.

    Doing some sort of silly calculation with a new block is gonna take up and ID with a really silly block when that was being handled just fine by AMS turrets, and I don't think this would actually lead to any significant optimazations at all. In fact, I think it would just make it worse.

    For Schema to do this he would also have to write an entirely new bit of code to do just this. which is really silly when the AMS turret system works just fine.

    Also. If you do this then there is absolutely zero point to designing different types of AMS turrets and could very easily lead to a scenario where these things are just AoE AMS despite your gimbal bit.

    Also, a probability system, seriously? That's just a hidden dice-rolling game beneath the surface. That isn't fun. That doesn't have any design choices like where to put the turrets associated with it. That doesn't have any choices related to what turret to use associated with it. What if I wanna use a fast tracking beam turret as my AMS and have it double as an anti-fighter weapon?

    Just no. So much no.
    I categorically disagree. AMS has always been unreliable after the first few seconds of the engagement. Just because the system "works" doesn't mean it works well. A CTH based system would be an excellent improvement over the current system, which works about as long as it takes dumbfire distractors to enter the AI's engagement range.
     
    Joined
    Jan 31, 2015
    Messages
    1,696
    Reaction score
    1,199
    • Thinking Positive
    • Likeable
    I haven't tested AMS in 3.0 yet, but it's an interesting proposal.

    I like the idea on the basis that it would improve performance. I dislike it in that I see PD as applying to all entities incoming towards a point target, be they missile, rocket, mine, bomb, bomber or fighter and that a block just for AMS seems overspecialized. Kind of a wash for me.
     
    • Like
    Reactions: Dire Venom
    Joined
    Feb 27, 2014
    Messages
    1,074
    Reaction score
    504
    • Purchased!
    • Legacy Citizen 4
    • Top Forum Contributor
    Some interesting ideas.
    Perhaps when missiles have had their makeover point defense can get an update as well.
    I recall Missiles getting proper HP values and other changes to make them more durable.
     
    • Like
    Reactions: Macharius and JNC
    Joined
    Sep 14, 2017
    Messages
    666
    Reaction score
    928
    First off. Schema himself has said that it wasn't a tracking issue but an issue with the missiles having glitched-high health. Meaning the missile HP was so high the AMS couldn't kill them. This has been fixed.

    Secondly. No. Just no. This is a terrible idea I'm sorry. I respect you Nosa, I love lots of your ideas, but not this.

    AMS turrets do fine. They track fine. And As far as I can tell in my tests they were hitting just fine under the new weapons update.

    Doing some sort of silly calculation with a new block is gonna take up and ID with a really silly block when that was being handled just fine by AMS turrets, and I don't think this would actually lead to any significant optimazations at all. In fact, I think it would just make it worse.

    For Schema to do this he would also have to write an entirely new bit of code to do just this. which is really silly when the AMS turret system works just fine.

    Also. If you do this then there is absolutely zero point to designing different types of AMS turrets and could very easily lead to a scenario where these things are just AoE AMS despite your gimbal bit.

    Also, a probability system, seriously? That's just a hidden dice-rolling game beneath the surface. That isn't fun. That doesn't have any design choices like where to put the turrets associated with it. That doesn't have any choices related to what turret to use associated with it. What if I wanna use a fast tracking beam turret as my AMS and have it double as an anti-fighter weapon?

    Just no. So much no.
    So, the more I think of it, you are right that it does not need a new block, but everything else about your response comes from a lack of experience building physics engines or any direct experience with the StarMade engine when put under stress. In theory, one could use a "fire-at-missiles" flag on a normal cannon turret to create an exception that initiates pre-calculated shots based on the chosen target so that you could maintain some level of multi-role functionality.

    That said, AMS do not, nor have they ever tracked fine when the game is under a heavy load. Tests so far where 1 missile fired between a couple of small ships just sitting there do not reflect what the game looks like when you have 5-20 million blocks worth of ships on the board with hundreds of missiles and thousands of direct fire weapons popping off at once. As the sim rate falls, margins of error increase, and they will just plain stop hitting missiles at all as was often the case in power 1.0 battles. This ability to overwhelm the game engine was a big part of why missile spam was so popular and cancerous.

    As for calculations, the optimization that happens with pre-calculated shoots is a compounding advantage over time on a way simpler formula. It is the difference between checking every bullet and missile for collisions every single sim cycle which beings to slow the game down at just a few thousand bullets per second vs a one time calculation that a would take hundreds of millions of shots a second to create any noticeable lag.

    Also, precalculated shots are resistant to other sources of lag because margins of error do not apply. A 15% chance to hit will always be a 15% chance to hit, no matter how much the battle turns into a slideshow war.

    As for dice rolling, that is already what the game is doing, but it's using a LOT of math to produce a very simple result. The problem is that the dice become weighted based on factors unrelated to your ship's design. As long as the factors of accuracy are set right, this mechanic would be indistinguishable from a hit-test mechanic, but without breaking under lag.

    As for AoE, you can still do a raytrace to confirm Line-of-Sight, and the gimbal would not be any different than a cannons already existent ability to do this. Just like the dice rolling issue, this mechanic would be indistinguishable from current mechanics.
     
    Joined
    Sep 14, 2017
    Messages
    666
    Reaction score
    928
    I haven't tested AMS in 3.0 yet, but it's an interesting proposal.

    I like the idea on the basis that it would improve performance. I dislike it in that I see PD as applying to all entities incoming towards a point target, be they missile, rocket, mine, bomb, bomber or fighter and that a block just for AMS seems overspecialized. Kind of a wash for me.
    Technically, current AMS is not this versatile; bombers and fighters are not targeted by Fire-at-Missile turrets and almost never get hit by stray shots since they have such inherently small profiles. Missiles, Rockets, Mines, and Bombs should all be considered for this mechanic, since they are not voxel entities. The only factor that matters is if you hit them, and not how you hit them.
     
    Joined
    Jul 4, 2013
    Messages
    425
    Reaction score
    273
    I think that there should just be a system so AI firing at fast targets with cannons/beams gets pre-calculated impacts with the game faking the projectiles flying there.
    You should still be able to manually shoot missiles down and it shouldn't be a separate weapon type as then we'd lose the style of awesome PD lasers (like the blue ones on Zahn Consortium corvettes from Empire at War's expansion) or Battlestar Galactica anti-missile flak.
     
    • Like
    Reactions: Dire Venom
    Joined
    Jul 1, 2013
    Messages
    530
    Reaction score
    348
    • Legacy Citizen 8
    • Community Content - Bronze 1
    I like the idea of saving performance through a calculation like this, and in canon on my vessels ams is handled by laser emitter domes on the surface not cannon based turrets so i wouldnt complain much if something like that was an option, but i do see pd turrets as being important to the game and should continue to function.

    I do have to question how you claim lag affects ams accuracy, as both the missile and ai turret are tracked and controlled server-side, right? Latency is a huge problem for players, but i dont see how the server can mess up so badly it forgets where it put that other part of itself (the missile) in a function (tracking and firing at that missile) that calls on that parts location and such
    And schema did confirm its a hp issue anyway as i recall, not one of accuracy
     
    Joined
    Jan 17, 2017
    Messages
    40
    Reaction score
    46
    Question 1: are you using default Ai accuracy settings? if no, what is it set to?
    Question 2: I build 3x3x2 AMT's that have dealt plenty well v.s swarming heats, so I'm curious about your configuration; are you using a single or double barrel AMT?

    In not having any issue with AMT-Ai after 'sciencing' different configurations, I can't see a need for AMT change.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    At the heart of it, this is just another optimization. It reduces glitchy behavior and improves performance. If Schema took the time to do this and do it WELL, then it could be a good addition.
     
    Joined
    Jun 22, 2013
    Messages
    196
    Reaction score
    157
    • Purchased!
    • Legacy Citizen 8
    I'm not in love with this idea, but one major benefit that occurs to me is that we could have the option of using beams for anti-missile systems as well as regular cannons. If cannons are given a set chance to miss in the abstracted simulation, beams could be as well. This is important because an array of missile-killing beams would look cool as shit, assuming the abstracted ams doesn't lose the visual animation fully simulated ams has.

    I don't think that's the only option to make beam ams fair, but it would be an easy way to do it as long as you were at it.
     
    • Like
    Reactions: Dire Venom