Awaiting feedback Getting stutters/freezes when a new player joins a server.

Posts
58
Likes
23
Title.
I've read people having this before but I'm only having this issue as of 1.6. I tried to see if the config was at fault but it gets wiped after every new launch of the game anyhow (another bug) so that's not it. Also tried a fresh install with fresh configs and still the same thing.

Any idea what this could be?
 

Karus

Donator
Posts
367
Likes
517
I had the exact same problem, lasted maybe a day, then it stopped completely.
I have absolutely no idea what was causing it, though I did set r_primitives to "2" as opposed to the default "0".
Whether or not this solved my issue, I cannot tell, but I urge you to give it a try, at least.
/seta r_primitives 2
 

Spaghetti

Floating in the void
R2D2
Movie Battles II Team Retired
Posts
1,637
Likes
1,633
What is defer player models set to? Under gameplay settings. Also what mode have you seen this under (open/fa/duel)?
 
Posts
58
Likes
23
I always have Defer turned off. And it happens in every mode. Without fail, I can be doing anything in any mode and as soon as a new player joins I get a 1-2 second freeze. It's not making the game just unplayable or anything but it got me killed once so I could see it becoming annoying.
 

Karus

Donator
Posts
367
Likes
517
I always have Defer turned off. And it happens in every mode. Without fail, I can be doing anything in any mode and as soon as a new player joins I get a 1-2 second freeze. It's not making the game just unplayable or anything but it got me killed once so I could see it becoming annoying.
Defer should be on. Always.
 

Spaghetti

Floating in the void
R2D2
Movie Battles II Team Retired
Posts
1,637
Likes
1,633
I've noticed that even with deferred on when checking the scoreboard it loads any of the deferred models which can cause a spike. Which is unfortunate because I use the scoreboard to count how many enemies/allies are alive.
This is base game behavior. It's the way you forced load of deferred stuff there too.

I turned it on but the problem still remains. Weird.
Edit: Just discovered it happens when a player is kicked too. But not if they just leave.
Did you restart the game after turning it on? The defer setting works for me 100% in open servers. I have not tried in duel mode. Need a consistent way to reproduce it if it is in fact an issue. You're also using JAMP, correct?
 
Posts
58
Likes
23
This is base game behavior. It's the way you forced load of deferred stuff there too.


Did you restart the game after turning it on? The defer setting works for me 100% in open servers. I have not tried in duel mode. Need a consistent way to reproduce it if it is in fact an issue. You're also using JAMP, correct?
Yeah, it was just not working for some reason. But then I used Karus' fix in their first reply (I somehow missed it before) and it seems to be working just fine now.
 

Karus

Donator
Posts
367
Likes
517
I think having /r_primitives defaulted at 2 in people's jampconfig may help solve many FPS/stuttering issues in future.
Perhaps this could be considered a small QOL improvement?
It's currently defaulted at 0.
 

Spaghetti

Floating in the void
R2D2
Movie Battles II Team Retired
Posts
1,637
Likes
1,633
Very strange. I can't find anything particularly useful on what r_primitives is actually supposed to do. What type of GPU do each of you have? @DougieJones @KarusBadders
 
Posts
58
Likes
23
Very strange. I can't find anything particularly useful on what r_primitives is actually supposed to do. What type of GPU do each of you have? @DougieJones @KarusBadders
NVIDIA GTX 1080Ti

It is pretty strange. Maybe it's both the defer option being on and the r_primitives thing at once that does it, rather than just one of the two? But yeah I've never heard anyone talk about that function so not sure what it does.
 

Spaghetti

Floating in the void
R2D2
Movie Battles II Team Retired
Posts
1,637
Likes
1,633
Asked coders in JKHub's discord and someone looked up settings it's related to:
C-like:
// "0" = based on compiled vertex array existance by the look of it it check up on some range stuff
ri->Cvar_CheckRange( r_picmip, 0, 16, qtrue );
ri->Cvar_CheckRange( r_ext_multisample, 0, 4, qtrue );
ri->Cvar_CheckRange( r_subdivisions, 4, 80, qfalse );
ri->Cvar_CheckRange(r_greyscale, 0, 1, qfalse);
ri->Cvar_CheckRange( r_displayRefresh, 0, 240, qtrue );
ri->Cvar_CheckRange( r_znear, 0.001f, 200, qfalse );
r_primitives, MIN_PRIMITIVES, MAX_PRIMITIVES min 0 max is 3

Some other googling later...
https://forum.fpsclasico.de/viewtopic.php?t=128
seta r_primitives "0" // set the rendering method (-1: skips drawing results in black screen, 0: uses glDrawElements if compiled vertex arrays are present or strips of glArrayElement if not present, 1: forces strips, 2: forces drawElements, 3: path for non-vertex array testing)

If that's true than changing r_primitives shouldn't make a difference, unless other things get modified by that. I just tested my performance with 0-3 and I get the best with 0, followed by 2 (10% slower for some reason, could be testing variance), and then 1 and 3 halve my FPS.

Still unsure how it could be related to deferred model loading.
 

Karus

Donator
Posts
367
Likes
517
Very strange. I can't find anything particularly useful on what r_primitives is actually supposed to do. What type of GPU do each of you have? @DougieJones @KarusBadders
NVIDIA GTX 1050
Interesting that you got less performance with r_primitives "2" than "0"
Perhaps it is related to hardware 🤔
changing r_primitives shouldn't make a difference, unless other things get modified by that
I think you're probably correct about this. It would make sense considering that by itself it shouldn't actually do anything in regards to deferred model loading.
 

Spaghetti

Floating in the void
R2D2
Movie Battles II Team Retired
Posts
1,637
Likes
1,633
Another coder chimed in confirming it should have nothing to do with model loading.

That you're both using recent Nvidia chipsets makes this more confusing. I have a 1080 and have never had it set to anything but 0, but do not experience any stuttering. If I'm reading the description of the setting correctly then 0 should be the same as 2 (2 just forcing the same rendering mode you get with 0 if hardware is available). I'll play with it more later to try and confirm if I do see FPS differences.
 
Posts
58
Likes
23
Another coder chimed in confirming it should have nothing to do with model loading.

That you're both using recent Nvidia chipsets makes this more confusing. I have a 1080 and have never had it set to anything but 0, but do not experience any stuttering. If I'm reading the description of the setting correctly then 0 should be the same as 2 (2 just forcing the same rendering mode you get with 0 if hardware is available). I'll play with it more later to try and confirm if I do see FPS differences.
Have you tried turning the defer player models option off to see if the issue replicates?
 

Spaghetti

Floating in the void
R2D2
Movie Battles II Team Retired
Posts
1,637
Likes
1,633
Have you tried turning the defer player models option off to see if the issue replicates?
I will the next time I play.

All expert opinion I can find is indicating r_primitives 0 and 2 should be identical, so I'm wondering if this is a bit of a placebo situation. Can you guys try setting it back to 0, restarting the game, and seeing if you start getting hitching again?
 

Karus

Donator
Posts
367
Likes
517
I will the next time I play.

All expert opinion I can find is indicating r_primitives 0 and 2 should be identical, so I'm wondering if this is a bit of a placebo situation. Can you guys try setting it back to 0, restarting the game, and seeing if you start getting hitching again?
Yeah, I can confirm overall performance is alot worse with 0, lots more hitches and stutters in general, especially when someone connects to the server.
I don't get this problem with primitives set to 2.
Tested just now.
UPDATE:
Yeah, nevermind. After about 10 minutes things stabalized. What's causing the stutters in the first place is beyond me, especially considering the fact that the stutters were almost unbareable on the day 1.6 dropped, but after a primitives 2 was set, it fixed itself. So strange.
 
Last edited:
Posts
58
Likes
23
I switched it off and it seems to be mostly the same but I noticed that there's more of a microstutter now (better than a 1-2 second stutter) when someone joins. I'd also venture to guess it was like that before and I just hadn't really noticed it, so I guess the Defer Player Models option is a half-fix at least. It's easier to stand than before anyhow.
 
Top