Instructions on how to objectively test hitreg. Post your hitreg problems here.
Nordic
Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
This thread servers two purposes. Its first purpose is to provide instructions on how to correctly record hitreg data. It will also serve as a location to post the data you collect about hitreg.
We now have new tools we can all use to objectively test hitreg. The game now has a console command called "hitreg" that outputs data about how and if you hit your target.
Here is an example of the hitreg output from my log file with both a no reg and then a false positive against a fade.
The hitreg command works as you would expect. When the game traces to see if it hits with a shot, everything used to control animation and position of the model is saved in a large json structure. This is done both on the client and server. The client saves the data with a unique key and waits for the server to send its copy of the shot. When the copy arrives, the structures are compared and if they differ, a warning is logged.
How to use the hitreg command:
The hitreg command can not be used on any server. It must first be enabled by a server admin. This means you will need to run your own server, or ask your favorite server admin to enable it for you.
The server admin can enable hitreg to be turned on with the following console command. "sv_tests 1"
Once a server admin has done that, a client can then type "hitreg" in console to begin recording data to the log.
"sv_tests 1" and "hitreg" will need to be re-enabled after each map change.
The client will see the following in his console confirming that hitreg has been turned on.
Server operators and admins, sv_tests should not be used for fun. It is similar to cheats, but instead of allowing anything it only allows a few debug tools to be turned on. Think before you turn on tests. The hitreg command does not give anyone an advantage, but it does dramatically increase the clients bandwidth usage. I would only allow a couple individual players to test hitreg at a time so that you do not stress the server.
The following server operators are willing to turn on sv_tests if you private message them:
SupaFred of TheThirstyOnos,
Ghoul of Survival of the fattest and Ghouls Box,
Wyzcrack of TacticalGamer,
Shameless of Tactical Freedom,
Wooza of Wooza's Server
Furs of the NSL Wraith Servers
Rusty of Diamond Gamers will on Wednesday evenings
Zero of Ibis servers.
More server operators may be willing but these are the only ones that have confirmed it for me.
You can contact them via the NS2 discord. Link here.
So now you have used the hitreg enabled. Look for "srv.hit" and "cli.hit" in your console or log to see if you actually had a hitreg issue.
While viewing the log I typically press Control -> F and search for "srv.hit" to find the hitreg issues. Your log is found in your "C:\Users\YOURUSERNAME\AppData\Roaming\Natural Selection 2" folder. You may see a lot of "diffs found" but those are unimportant. There is not a hitreg issue unless there is a discrepancy between srv.hit" and "cli.hit" such that one is true and the other is false. I have two examples shown below.
This is a no reg on a fade. The server (srv.hit) says it was a miss, and my client (cli.hit) says it was a hit.
This is a false positive on a fade. The server (srv.hit) says it was a hit, and my client (cli.hit) says it was a miss.
How to provide data to the developers about hitreg:
The developers are looking for a video similar to this. (demonstrates one of the few remaining hitreg issues)(Video by Ironhorse)
Or similar to this video I made showing the fade hitreg issues I have used in my examples above.
You need to make a video with the following traits:
If you wanted to above and beyond in gathering data for hitreg, it would be nice if you provided the log along with the video. The developers do not need the whole log, but just posting a portion of it like the example I gave at the beginning of this post would be nice. If you post it here, please put a spoiler around it. You could also upload your log to pastebin.com and link it here. If you do not want to post your log publicly I would private message @Ironhorse.
It did not take me long at all to record and upload that video. Not counting time playing ns2, it probably takes me about 5 minutes to set up, edit, upload, and post a video like above.
If you do not know how to record your gameplay, don't worry it is easy. There is a lot of free software available to use. I would start by reading this reddit guide to pc gamplay recording.
Ironhorse uses Nvidia Shadowplay and AVS video editor. I personally use the free softwares, Open Broadcaster with avidemux video editor. If you need any help recording your gameplay to capture hitreg feel free to ask.
We now have new tools we can all use to objectively test hitreg. The game now has a console command called "hitreg" that outputs data about how and if you hit your target.
Here is an example of the hitreg output from my log file with both a no reg and then a false positive against a fade.
Client : 1068.079224 : Hitreg: No data for key '32083-1' found Client : 1068.311157 : 32090-1: Diff found for attack on Fade-1899 (physTime 1068.211): srv.trace_fraction: 0.071534 cli.trace_fraction: 0.0097454 srv.trace_start.y: -1.3020 cli.trace_start.y: -1.2316 srv.trace_end.y: 4.8236 cli.trace_end.y: 4.8941 Client : 1068.375366 : 32092-1: Diff found for attack on Fade-1899 (physTime 1068.275): srv.hit: false cli.hit: true srv.trace_fraction: 0.94083 cli.trace_fraction: 0.42324 srv.trace_start.y: -1.3020 cli.trace_start.y: -1.0717 srv.trace_start.x: 17.8133 cli.trace_start.x: 17.8006 srv.trace_start.z: -142.8070 cli.trace_start.z: -142.8590 srv.trace_end.y: -0.0017 cli.trace_end.y: 0.2286 srv.trace_end.x: 116.9316 cli.trace_end.x: 116.9189 srv.trace_end.z: -129.6209 cli.trace_end.z: -129.6728 Client : 1068.408203 : Hitreg: No data for key '32093-1' found Client : 1068.408203 : Server data nil Client : 1068.482910 : 32095-1: Diff found for attack on Fade-1899 (physTime 1068.383): srv.hit: true cli.hit: false srv.trace_fraction: 0.0073419 cli.trace_fraction: 0.92640 srv.trace_start.y: -1.3020 cli.trace_start.y: -1.0808 srv.trace_start.x: 17.8192 cli.trace_start.x: 17.8297 srv.trace_start.z: -143.0782 cli.trace_start.z: -143.1285 srv.trace_end.y: 4.3246 cli.trace_end.y: 4.5459 srv.trace_end.x: 83.3361 cli.trace_end.x: 83.3466 srv.trace_end.z: -67.7398 cli.trace_end.z: -67.7901 Client : 1068.544800 : 32097-1: Diff found for attack on Fade-1899 (physTime 1068.445): srv.trace_fraction: 0.0061197 cli.trace_fraction: 0.013319 srv.trace_start.y: -1.3020 cli.trace_start.y: -1.1728 srv.trace_start.z: -143.2422 cli.trace_start.z: -143.2582 srv.trace_end.y: 3.0647 cli.trace_end.y: 3.1940 Client : 1068.581299 : Hitreg: No data for key '32098-1' found Client : 1068.581299 : Server data nil Client : 1068.649414 : 32100-1: no diffs found for attack on Fade-1899 (hit=false) Client : 1068.707520 : 32102-1: no diffs found for attack on Fade-1899 (hit=false) Client : 1068.742310 : Hitreg: No data for key '32103-1' found Client : 1068.742310 : Server data nil Client : 1068.816284 : 32105-1: no diffs found for attack on Fade-1899 (hit=false) Client : 1068.880127 : 32107-1: no diffs found for attack on Fade-1899 (hit=false) Client : 1068.913086 : Hitreg: No data for key '32108-1' found Client : 1068.913086 : Server data nil retraced killed Nordic with Swipe
The hitreg command works as you would expect. When the game traces to see if it hits with a shot, everything used to control animation and position of the model is saved in a large json structure. This is done both on the client and server. The client saves the data with a unique key and waits for the server to send its copy of the shot. When the copy arrives, the structures are compared and if they differ, a warning is logged.
How to use the hitreg command:
The hitreg command can not be used on any server. It must first be enabled by a server admin. This means you will need to run your own server, or ask your favorite server admin to enable it for you.
The server admin can enable hitreg to be turned on with the following console command. "sv_tests 1"
Once a server admin has done that, a client can then type "hitreg" in console to begin recording data to the log.
"sv_tests 1" and "hitreg" will need to be re-enabled after each map change.
The client will see the following in his console confirming that hitreg has been turned on.
Client : 412.793579 : hitreg checking on, prec 2
Server operators and admins, sv_tests should not be used for fun. It is similar to cheats, but instead of allowing anything it only allows a few debug tools to be turned on. Think before you turn on tests. The hitreg command does not give anyone an advantage, but it does dramatically increase the clients bandwidth usage. I would only allow a couple individual players to test hitreg at a time so that you do not stress the server.
The following server operators are willing to turn on sv_tests if you private message them:
SupaFred of TheThirstyOnos,
Ghoul of Survival of the fattest and Ghouls Box,
Wyzcrack of TacticalGamer,
Shameless of Tactical Freedom,
Wooza of Wooza's Server
Furs of the NSL Wraith Servers
Rusty of Diamond Gamers will on Wednesday evenings
Zero of Ibis servers.
More server operators may be willing but these are the only ones that have confirmed it for me.
You can contact them via the NS2 discord. Link here.
So now you have used the hitreg enabled. Look for "srv.hit" and "cli.hit" in your console or log to see if you actually had a hitreg issue.
While viewing the log I typically press Control -> F and search for "srv.hit" to find the hitreg issues. Your log is found in your "C:\Users\YOURUSERNAME\AppData\Roaming\Natural Selection 2" folder. You may see a lot of "diffs found" but those are unimportant. There is not a hitreg issue unless there is a discrepancy between srv.hit" and "cli.hit" such that one is true and the other is false. I have two examples shown below.
This is a no reg on a fade. The server (srv.hit) says it was a miss, and my client (cli.hit) says it was a hit.
Client : 1068.375366 : 32092-1: Diff found for attack on Fade-1899 (physTime 1068.275): srv.hit: false cli.hit: true
This is a false positive on a fade. The server (srv.hit) says it was a hit, and my client (cli.hit) says it was a miss.
Client : 1068.482910 : 32095-1: Diff found for attack on Fade-1899 (physTime 1068.383): srv.hit: true cli.hit: false
How to provide data to the developers about hitreg:
The developers are looking for a video similar to this. (demonstrates one of the few remaining hitreg issues)(Video by Ironhorse)
Or similar to this video I made showing the fade hitreg issues I have used in my examples above.
You need to make a video with the following traits:
- The video shows you getting a no reg or false positive.
- Shortly after you get the no reg or false positive, the console in shown in the video. You can open up the console with the tilda "~" key which is right above the tab key.
- Server side blood is turned OFF in ns2+. It can give misleading information when testing hitreg.
- Video must be high quality. The developers need to be able to see what was going on.
- Video ideally would be 60 fps. This makes it easier for the developers to see what was happening.
- Uploaded to a place the developers can access the video. Youtube works great because it allows 60fps videos.
- Having net_stats on screen can help a lot also.
If you wanted to above and beyond in gathering data for hitreg, it would be nice if you provided the log along with the video. The developers do not need the whole log, but just posting a portion of it like the example I gave at the beginning of this post would be nice. If you post it here, please put a spoiler around it. You could also upload your log to pastebin.com and link it here. If you do not want to post your log publicly I would private message @Ironhorse.
It did not take me long at all to record and upload that video. Not counting time playing ns2, it probably takes me about 5 minutes to set up, edit, upload, and post a video like above.
If you do not know how to record your gameplay, don't worry it is easy. There is a lot of free software available to use. I would start by reading this reddit guide to pc gamplay recording.
Ironhorse uses Nvidia Shadowplay and AVS video editor. I personally use the free softwares, Open Broadcaster with avidemux video editor. If you need any help recording your gameplay to capture hitreg feel free to ask.
Comments
Updated OP noting that, and underlined.
Basics of a client server model
I am going to try and explain with a theoretical example, then I want to look at a 'no reg' video that Nordic recorded.
Example
You are a marine are tracking a lerk. Your client receives a packet advising of the lerks position and velocity.
If this was happening 'live' you'd have a really jittery game, as other players positions would be constantly corrected on your screen. This is where the Interpolation (interp) comes in.
Nordic showed me a stream of examples, and the relevant logs, and the one thing I noticed after initially speaking to him, that indicated this is normal was that almost all the occurrences of 'hit-reg' issues seem to have happened when target is colliding with something, thus rapidly altering it's velocity.
Any shots towards the edge of a model in these instances should be expected to bring these conflicting results, as edges will be in different places. If these videos were showing it happen in centre model shots with no lateral movement on a LAN, then I would have to rethink.
From every frame in the logs I have seen, regardless of hit-reg discrepancy or not, they show variation between where the client thinks the player is and where the server thinks the player is, so this leads me to confirm my initial suspicions.
Here is a 'No-Reg' video on a skulk:
This video partially makes my point, but also potentially disproves it, I need some further advice on this. Here is a partial of the log from the hitreg tool.
I am assuming I understand these correctly, but could be wrong.
I believe the trace fraction shows the length of the trace. The client traced a hit at a distance of .4 units, the server at almost 1 unit. This was likely to be the floor.
I have taken 2 stills, one as close as I can get on you tube to the frame the gun fired, and the 2nd when the hit displays clientside. Look for the skulk vs the crosshair:
I am so lucky he fired a tracer round on this particular attempt
As you can see skulk nowhere near line of sight.
This is the point just as the clients 'hit' registers:
If you slow the video down enough, you see that as the skulk lands, it looks like it is going off towards where the bullet ends up firing, but jinks back, at the marine and then away again. The landing and sudden change of direction would certainly fit the issues as I have described.
Apart from one small anomaly (or a huge elephant in the room if you like)!
If the client thought the skulk was where the hit was given, why wasn't it displaying the skulk where it thought it was?
As this was just after landing, was it the 'hitbox doesn't fall at the same speed issue'?
Answers on a postcard....
EDIT ---
In my opinion, that skulk video is the only 'genuine' hit-reg issue on all the videos Nordic showed to me, but this is more a lucky catch than meaning these other messages are anything other than normal operation.
That setting basically hides certain hitreg issues. One should not use it when recording footage looking for issues.
It is my recording, and I am not using server confirmed blood in that video.
Also shows he didn't actually read my well informed argument, as he would have seen Nordics name mentioned many times.
Impossible. The blood is far too behind from the model, and the blood shows exactly at the same time as the crosshair hit indicators and dmg numbers.
Blood should show some 400 ms before those occur, (show up on the model instead) and it's obviously not happening. You definitely had server side blood on for that video.
The other videos I showed you may be "normal operation" but it does not matter. They may just be "merely an artefact of a server/client model." I was simply reporting them as errors found. I will continue to report them internally until I am told it is no longer desired.
In my previous videos I was using server confirmed blood, but you pointed out that I should not be for the purposes of these videos. After that conversation I immediately turned it off. It was set to off for that video.
Can you stop trying to just brush this aside, and actually read my post?
Pastebin in the comments. Quality sucked, i screwed up the resolution downscale and youtube didnt like it.
I can make another one if it helps, but I figured there wasn't much point.
@bs_ in future videos it would help a lot if you could show the console during the pauses. It is hard to match up the video with the log unless you open up the console so the developers can see the hitreg output.
If possible, ahigher quality video would go a long ways. Especially if it was 1080p at 60fps.
Otherwise, thank you for sharing. I saw that the log shows there were 62 no regs in that video.
The #numbers show up in the log