real_tabasco_sauce Posted Sunday at 18:51 Report Share Posted Sunday at 18:51 (edited) A problem 0ad has faced for a long time is that of overshooting. Since the range of a unit's target is checked after attack completion, as long as the target was in range then, ANY attack afterwards will work. This is not so noticeable in many cases, but for slow attacking units in particular, enemy units can travel a long way in that time, leading to things like this: Untitled video - Made with Clipchamp (3).mp4 Also, this problem is very clear with siege units, which have a slow fire rate, and crossbow units. In @ValihrAnt's recent video, you can see that ram ships are annoyingly able to damage units that are far away, resulting in chaotic and unpredictable gameplay. What I propose to fix this is 2 additional range checks that occur during the unit's repeat time. https://gitea.wildfiregames.com/0ad/0ad/pulls/7178 This doesn't completely solve the problem, but it greatly reduces it to where it is basically unnoticeable for pikemen: 20241103-1845-03.6204650.mp4 The additional range checks do slightly impact performance, but its actually less than I expected: After the recent improvements to performance, I think we can "spend" some performance cost for nice things like this. Players, would you accept a small performance cost like this in order to get more responsive and intuitive gameplay? If not, I could limit this to slow-firing units which are the biggest offenders. However, I do think faster firing units stand to gain from this even if the problems are not as noticeable for these units. Edited Sunday at 21:17 by real_tabasco_sauce 3 1 Quote Link to comment Share on other sites More sharing options...
BreakfastBurrito_007 Posted Sunday at 19:34 Report Share Posted Sunday at 19:34 Aye Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted Sunday at 20:06 Report Share Posted Sunday at 20:06 I thought they were heart attacks. ---joke--- So a unit with a slow attack and range could kill you at meters? Quote Link to comment Share on other sites More sharing options...
real_tabasco_sauce Posted Sunday at 20:14 Author Report Share Posted Sunday at 20:14 8 minutes ago, Lion.Kanzen said: So a unit with a slow attack and range could kill you at meters? Yep. As long as you were near that unit immediately after you first got attacked. Quote Link to comment Share on other sites More sharing options...
real_tabasco_sauce Posted Monday at 00:07 Author Report Share Posted Monday at 00:07 NoOvershoot.zip A mod for a27. You can apply this if you get the nightly build. 1 Quote Link to comment Share on other sites More sharing options...
real_tabasco_sauce Posted 17 hours ago Author Report Share Posted 17 hours ago (edited) I just had a question about how this affects unit chasing when cavalry are chasing infantry. It turns out the difference is pretty minimal and is hard to capture on video. The concern was that the range checks during the repeat time would cancel a jav cav's attack, making chasing buggy and ineffective. So, i did a quick test: 5 mercenary skirm cavalry chasing 20 regular skirmishers. with the change, it took 1:46.65 to kill all the units and without, it took 1:56.49. I don't think there is a mechanism for interrupting the jav cav's attack: once the cav can attack an enemy unit, the attack will take place. What this approach eliminates is the case where a cav can launch 2 projectiles from the same spot in a chasing scenario, with the second one being substantially farther than the unit's range. Edited 17 hours ago by real_tabasco_sauce 1 Quote Link to comment Share on other sites More sharing options...
Atrik Posted 16 hours ago Report Share Posted 16 hours ago 45 minutes ago, real_tabasco_sauce said: I don't think there is a mechanism for interrupting the jav cav's attack Interesting but If attacks aren't interrupted when a unit get out of range, what exactly prevent overshooting? 1 Quote Link to comment Share on other sites More sharing options...
Atrik Posted 16 hours ago Report Share Posted 16 hours ago Anyways, I think overshooting is a necessary evil to make the game playable. I though we already discussed this @real_tabasco_sauce. If the range check was done prior to the exact time where attack start to repeat, you fixed a great bug! But it's not changing overshooting, witch is also good. (Haven't checked your patch, just making assumptions based on what you write above). 1 Quote Link to comment Share on other sites More sharing options...
real_tabasco_sauce Posted 16 hours ago Author Report Share Posted 16 hours ago Well it’s not prevented 100% it’s just that there is less time for the unit to travel past the max range and therefore it’s not so egregious. ie overshoot by 0.5 sec isn’t as bad as overshoot by 1.5 sec. For bolts, it’s overshoot by 1 sec versus 6. 2 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted 15 hours ago Report Share Posted 15 hours ago 1 hour ago, real_tabasco_sauce said: Well it’s not prevented 100% it’s just that there is less time for the unit to travel past the max range and therefore it’s not so egregious. ie overshoot by 0.5 sec isn’t as bad as overshoot by 1.5 sec. For bolts, it’s overshoot by 1 sec versus 6. Do you think it could be optional? 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.