New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with hit detection #1408
Comments
Some initial changes done in f73b9c8. Early testing indicates better results already. |
See also #1201 to potentially improve hit "feeling" by having hitsounds generated server side. |
Point of interest |
For the record: some heavy testing was done back in March, with various combination of etded/etlded and Jaymod/Legacy mod (since Jaymod is compatible with etlded, has same hitbox, etc.). The issue has been pigeonholed to the mod code, especially antilag part.
The last change done above however gave mixed results: while it felt better on the testing server, in some way, the feeling was worst once deployed on a populated server. I do believe reworking the antilag/antiwarp from scratch would be easier than finding out where the original issue has been introduced. Legacy mod implements Zinx antiwarp from etpro (shared publicly), and might have used etpub as a base for its implementation back in ~2013. However, afaik some people mentioned etpub (and derived mods) implementation has some issues, but Jaymod implementation should be rather independent from etpub codebase family. It might be worth looking at it since it's been opensourced since then by Jaybud. |
From @Aranud, and related to @rafal1137 comment above:
|
A few extra resources about existing implementations:
|
Interesting note in NQ code Propably worth implementing it Ref: |
I'd heavily suggest to try understanding the code before pushing "fixes", knowing etpub and derived might have issue of their own (see above comment). In that case, tjw was an etpub coder, and never directly participate to NQ dev afaik. NQ being derived from an old version of etpub, that part of the code might have been dropped from later etpub version for good reason. |
@rmarquis Yeah this reply from
Might be a reason why it was removed. |
Other differences between ETL / ETPub / NQ for attackTime assignment : On Pub the value from g_antilagDelay is added (by default the value is set to 0).
|
Another differences but on Jaymod side this time : there is one different regarding the implementation of unlagged in ETL / ETPUB / NQ compared to Jaymod and it's there : https://github.com/budjb/jaymod/blob/bbe44e0cca806d6b51260d48d4c11eab2b85bfe9/src/cgame/cg_ents.cpp#L2340-L2349 |
To ensure the client size values changes are take into account for colision detection, we must link the entity before doing the trace.
Bots don't get their position adjusted, so we have to apply the syringue hitbox height change outside this function. Also, only modify the syringue hitbox if the player is wounded or prone, otherwise on standing player, the syringue could not hit.
Yes, we are playing on
In my opinion the antilag issue is fixed too, doesn't matter if server uses sv_fps 20 or 40. The hitbox change and various other improvments did the job. If it somehow isn't fixed then I don't know personally, I've been playing on public server too and everything seemed fine, but maybe it's something I just can't see like the "delay". |
All right, but my point is that we don't know if it is fixed for sure, and testing with Maybe we'll need to set up test servers with Jaymod/Legacy as we did previously. |
From games I played on internet servers and from what I tested on local dedicated server ( I don't know how it could be better than this, but maybe it can somehow, maybe there is still some bug that no one noticed to this day, but I believe we got to a point it might not matter, if one day someone comes with an example that something didn't work, then that's great. If someone wants to keep looking for things to improve then that's cool too. It's been a while since I've heard someone complain about hitreg/hitboxes. The only thing I'm worried is that delay issue which is of course a matter of ping mostly and I'm yet to find the cause it would be different between mods. So far I can prove that legacy is the same or has lower delay than etpro. I'm not really saying you should trust me, I don't consider myself a good programmer, but I've spent literal days on this already, so unless someone comes to me with evidence (or at least claims that I can check if they are true) I say it's fixed and better than etpro, be it hit registration or hitboxes, because not only it feels better for me, but we fixed issues that are still in etpro. |
Yes, and again: this isn't about not trusting you, nor dismissing the work you did (and my apologies if any of the above message made you think otherwise). I saw your changes (which are all great), but none of them fixed anything in the antilag interpolation (afaik) which we factually know to be somewhat borked with the above test from last year. I have no doubt hitboxes and hit feeling are better now compared to the past, but this isn't my direct concern here. Rather, I'd like to see that underlying issue be fixed, and ideally be certain it is fixed by measuring it somehow (isolating variables is a nice start). All the rest of the changes is a nice bonus on top, obviously. Edit: also, antilag is obviously kinda hard to test locally. It's also what I did above, but only at a lack of having any better way to test it. |
No need to apology, I'm not taking it as dismissing my or anyone elses work. And don't get me wrong, I would like to fix it and be 100% sure it is fixed too, but I don't know how it can be accomplished as I tried many things that only point to it working and I'm out of ideas how to prove it otherwise. But I'm open to any ideas or examples or evidence, but just by reading the code for the 20th time in the hopes of spotting something I believe I will not get anywhere anymore personally. For the antilag interpolation, the code for interpolation on client and antilag is the same. The user command with the time player made a shot is sent (and so we know what time on client the interpolation was done while he shot) and that time is used to interpolate between two saved snapshots that were sent to the player. The only thing I see that could interfere and cause issues is antiwarp as it can change the command time, but I've yet to find evidence it actually does (in a normal game scenario where you don't seem have internet issues at all) and messes up antilag in the process. |
All right. I realize we might not all be on the same page, as that issue has been discussed on Discord long time ago and some information I'm taking as granted might not be clear to everyone. I'll try to write a recap here, and hopefully you might understand my thought process a bit better. Back in the early days (~2012-2014), ETL devs added many features and many optimizations here and there. The code started back from the original W:ET and was lagging significantly behind all existing mods. Many stuff were added, and along them also many regressions - over time, we fixed many but it took literally years of backtracking. Some doubt about the hit "feeling" were issued, but dismissed. However, with time it became clear something was fundamentally wrong so we eventually set up a series of test to understand what's going on. Since we had no idea where the issue was located, we tested both the server/client part and the mod part, using Jaymod as reference.
Jacker set up a few servers with a combination of server/mods as described in the table above. We then we did some lengthy and boring test remotely over a few evenings. Since we couldn't use bot to properly to test antilag, we basically used scripted clients running straight, with us as additional clients to shoot them under various angle. Shoot, let them respawn, repeat. Do that hundreds of time. Change one server variable at a time. Repeat again. Boring as fuck, but the idea was to test each component and cvars in isolation, and minimize randomness as much as possible (which is the opposite of what's happening on live servers). The results showed the issue was located mod side, specifically when So yeah, we were all pretty sure the "antilag works how it is supposed to" because we've checked its implementation dozens of time by at least 4 people (5 including you), but also: we factually knew the antilag doesn't work how it is supposed to. Forward a few months, with many additional and positive hitboxes improvements and what not, but when I read something that basically amount as "it feels better, so it's fixed", but that not much was actually changed on the antilag level, I have more than doubt. I mean, I don't have any doubt all the extra work improved the hit feeling, but logic says the underlying issue hasn't been fixed at all. Hopefully you follow the reasoning without much difficulty, and kinda understand why I'm generally very skeptical of "opinions about feeling" ;) Now, let's look at that last reverted commit 31ee385 (introduced in 8a7d58a and extended by a few others). This looks like an over zealy optimization:
All of these factors make me think there is a high possibility of it being responsible for that antilag issue. Now, I really don't want to rejoice too early and consider the issue fixed without any somewhat objective feedback. We've all spent so much time on that specific issue that it is kind of ridiculous, and I'd rather be 100% certain it's gone once and for all (if only to really consider etpro as being the subpart mod it actually is :P). I guess with you guys used to play with Maybe spinning 2 servers with 2.77.1 and a recent snapshot might help here, so we could do a systematic comparison with a low sv_fps. Opinion @jackeri? |
Both of you have very valid opinions about this, I think @ryzyk-krzysiek has excellent POV on this issue due to the fact that he has played actively through these changes for the past year or so and has the end-user opinion on things (which is ultimately the most important thing), however his opinion might be unconsciously skewed a bit since he has done things fix the issue along the way. However @rmarquis has the background knowledge on how things have evolved over the years, and this is very important for the sake of knowing and validating if the issues are truly fixed (btw I have no idea how actively you play). I think more methodological testing is definitely warranted regarding this, and I'm down to help with that. |
This is what I don't understand either how it could help because This also shouldn't affect the actual trace to check for if head was hit which is here: Line 931 in 28a4ae4
Where even if G_FreeEntity was missing it wouldn't cause issues for future traces I think? It would be memory/too many entities problem because there is a limit of 1021(?). That's my understanding and maybe I'm wrong.
TM public useses I agree I might be biased and by the amount of time I've spent on it I could be blind to some things. |
…etlegacy#1408 This was added as a test some 9 months ago, but basically ever since then, `g_playerHitBoxHeight` has just been set to __48__ on servers, so let's just remove the cvar and use the vanilla hitbox height, as it's what's currently being used.
…#1408 This was added as a test some 9 months ago, but basically ever since then, `g_playerHitBoxHeight` has just been set to __48__ on servers, so let's just remove the cvar and use the vanilla hitbox height, as it's what's currently being used.
Reopen, failure |
…refs #90 #1408 1. As far as I know the part of the antiwarp design was to start allowing all incoming user commands if the player stopped moving, because - as I understand - he can't warp if he is not moving. This is done by checking user move commands in G_CmdScale, but the issue is player doesn't come to a stop as soon as those commads stop, which was causing player to warp for the remaining commands. 2. Antiwarping bots makes no sense. 3. If I understand correctly, as of now and just like in etpro, players are allowed to warp for the 75ms worth of commands LAG_MAX_DELTA. From what I tested warping is a bit visible still because of it. Could be maybe adjusted in the future but for now I left it be, because I'm not 100% sure if current fix in PR will be good and if changing that 75ms to lower value will not make playing less enjoyable for players with bad connections.
…refs #90 #1408 1. As far as I know the part of the antiwarp design was to start allowing all incoming user commands if the player stopped moving, because - as I understand - he can't warp if he is not moving. This is done by checking user move commands in G_CmdScale, but the issue is player doesn't come to a stop as soon as those commads stop, which was causing player to warp for the remaining commands. 2. Antiwarping bots makes no sense. 3. If I understand correctly, as of now and just like in etpro, players are allowed to warp for the 75ms worth of commands LAG_MAX_DELTA. From what I tested warping is a bit visible still because of it. Could be maybe adjusted in the future but for now I left it be, because I'm not 100% sure if current fix in PR will be good and if changing that 75ms to lower value will not make playing less enjoyable for players with bad connections.
This fixes PMF_TIME_KNOCKBACK never being set unless head was hit
The "feeling" when shooting is somehow delayed. The way it manifests is just simply: you press the shooting button -> the hit event may or may not register at all or it registers delayed.
Things to look for: antiwarp code, antilag code and the "updated" client & server download code made in ~2015 ish.
The text was updated successfully, but these errors were encountered: