• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Regarding "One Frame Thread Lag"

[TW]redeye

Programmer
Jun 21, 2010
336
101
0
Roswell, GA
I don't get this. Are you saying that with OFTL off there is no parallelism between the game- and render-thread? Because from your 1st post I got the impression that there was.
There is, but it is negligible to the point that you are 'essentially' running single threaded.
 

Proud_God

FNG / Fresh Meat
Dec 22, 2005
3,235
548
0
Belgium
I have 2 questions/ concerns:

1) if your game thread is consistently faster than your render thread, won't you be in the same situation with OFTL on as off, with the added downside that you are constantly 1 frame behind?

2) I suppose the client side hit detection uses the game thread to determine the game state. But, with OFTL on, won't that mean that it is more difficult to hit people, since you might be looking at a screen that is no longer current with regards to the game thread.
I seem to notice it is harder for me to hit enemies with OFTL on, which supports this.
 

[TW]redeye

Programmer
Jun 21, 2010
336
101
0
Roswell, GA
1) if your game thread is consistently faster than your render thread, won't you be in the same situation with OFTL on as off, with the added downside that you are constantly 1 frame behind?
Think about that again. Hint: The key is to think with parallelism in mind. ;)

2) I suppose the client side hit detection uses the game thread to determine the game state. But, with OFTL on, won't that mean that it is more difficult to hit people, since you might be looking at a screen that is no longer current with regards to the game thread.
I seem to notice it is harder for me to hit enemies with OFTL on, which supports this.
Refer to my first post on this thread.
 

Proud_God

FNG / Fresh Meat
Dec 22, 2005
3,235
548
0
Belgium
Think about that again. Hint: The key is to think with parallelism in mind. ;)
I understand that OFTL gives more pararellellism as the 'frame queue' (which has a max length of, as I understand it, only 1 frame) is being filled. However, once the frame queue is full, you are stalling for the N+2'th frame to finish.

How is this situation better than being stalled for the N+1'th frame with OFTL off (even more, it is worse as you are one frame behind)

Correct me if I'm wrong ofcourse:)

I also note that for myself, I gain little to no fps from OFTL, only some input lag.
 

[TW]redeye

Programmer
Jun 21, 2010
336
101
0
Roswell, GA
Ok, for the sake of argument let's assume that your game thread consistently takes 5ms to run and the render thread takes 10ms to run.

If you run with OFTL off, once the render thread has finished rendering the frame (10ms), it has to wait an additional 5ms for the game thread to finish computing the next frame before it can do any work. Since the render thread is not allowed to lag behind (also read as since the game thread is not allowed to work ahead) there is no queued frame. Hence, the effective time to render a frame from the render thread's perspective becomes 15ms.

On the other hand, if you have OFTL enabled, by the time the render thread has finished rendering one frame, it will already have a queued up frame to work on immediately. So the effective render time is now 10ms as opposed to 15ms.

Of course, if the render thread is more than 2 times slower than the game thread, then it will not always have a queued up frame, and as a result OFTL will yield diminishing returns.
 

Proud_God

FNG / Fresh Meat
Dec 22, 2005
3,235
548
0
Belgium
If you run with OFTL off, once the render thread has finished rendering the frame (10ms), it has to wait an additional 5ms for the game thread to finish computing the next frame before it can do any work.
The confusion is still not cleared up. In your original post you said, regarding the OFTL off scenario:

"While the Nth frame is being rendered, the game thread can compute your (N+1)th frame in parallel."

This seems in conflict with the quoted sentence above?
 

[TW]redeye

Programmer
Jun 21, 2010
336
101
0
Roswell, GA
If you run with OFTL off, once the render thread has finished rendering the frame (10ms), it has to wait an additional 5ms for the game thread to finish computing the next frame before it can do any work.
This is for the render thread.

"While the Nth frame is being rendered, the game thread can compute your (N+1)th frame in parallel."
This is for the game thread.

The game thread is not dependent on the render thread, and hence can start computing the next frame before the render thread has finished. But the render thread is dependent on the game thread, and cannot begin a frame before the game thread has finished.

Also, I was being very simplistic in my 5ms, 10ms example. I hope you get the idea. You'll just have to put 2 and 2 together. Unfortunately, this is about as much detail I can go into in the forums.
 
Last edited:

Proud_God

FNG / Fresh Meat
Dec 22, 2005
3,235
548
0
Belgium
Sometimes pictures say more than words, so here is my understanding of the scenario where game thread = 5ms and render thread = 10ms.
Beyond the initial throughput increase for the game thread, I see no advantage of OFTL. Where is this interpretation wrong?

Note: I realize this is a simplified scenario, but it gets my point across.
In cases where the render thread is sometimes faster and sometimes slower than the game thread, I can imagine there being more benefit.
 

Attachments

Last edited:

mattlach

FNG / Fresh Meat
Oct 20, 2011
415
134
0
Massachusetts
Sometimes pictures say more than words, so here is my understanding of the scenario where game thread = 5ms and render thread = 10ms.
Beyond the initial throughput increase for the game thread, I see no advantage of OFTL. Where is this interpretation wrong?

Note: I realize this is a simplified scenario, but it gets my point across.
In cases where the render thread is sometimes faster and sometimes slower than the game thread, I can imagine there being more benifit.
I think that is fairly accurate, except for the part where you are assuming that the render pipeline flows at an even rate.

Each frame is different, and as such takes more or less time to finish rendering. Having that n+1 th game thread I think makes more of a difference when things slow down and speed back up again.
 

1conu59

FNG / Fresh Meat
Nov 28, 2011
921
4
0
Lille
gfa.xooit.fr
Interesting topic here, but even with all this explanations made here, I still have the same questions.

Is it better for accuracy and mouse responsivity to play with or without OneFrameThreadLag ?

I think to resume, that's the answer that every player wait for :p
 

nymets1104

Active member
Dec 18, 2012
2,433
24
38
USA
Interesting topic here, but even with all this explanations made here, I still have the same questions.

Is it better for accuracy and mouse responsivity to play with or without OneFrameThreadLag ?

I think to resume, that's the answer that every player wait for :p
I was blown away by the difference I found with OFTL disabled. Mainly in aiming, cross-hairs moved more smooth and seemed to react more quickly to mouse movement. Before turning it off, I was helpless with moving targets as movement for tracking them was choppy and laggy. I wont play with it turned on ever again.
 

Zetsumei

FNG / Fresh Meat
Nov 22, 2005
12,459
1,433
0
31
Falmouth UK
I was blown away by the difference I found with OFTL disabled. Mainly in aiming, cross-hairs moved more smooth and seemed to react more quickly to mouse movement. Before turning it off, I was helpless with moving targets as movement for tracking them was choppy and laggy. I wont play with it turned on ever again.
I simply cannot play with it enabled. I don't have too high of a framerate, I average between 40-50 and although turning it on makes my fps higher. The sole reason why I want a high fps is for responsiveness.

Since turning it on makes the games mouse input feel extremely delayed, I turn it off. On my laptop I rather play at 30fps with it off, than at 40 fps with it on.

Even if the system in theory should work better, it gives a serious bad case of input lag. That you can even be clearly noticed in the main menu without even being in a game.
 
Last edited:

1conu59

FNG / Fresh Meat
Nov 28, 2011
921
4
0
Lille
gfa.xooit.fr
I simply cannot play with it enabled. I don't have too high of a framerate, I average between 40-50 and although turning it on makes my fps higher. The sole reason why I want a high fps is for responsiveness.

Since turning it on makes the games mouse input feel extremely delayed, I turn it off. On my laptop I rather play at 30fps with it off, than at 40 fps with it on.

Even if the system in theory should work better, it gives a serious bad case of input lag. That you can even be clearly noticed in the main menu without even being in a game.

Thank for this statement I had exactly the same impression on it but unfortunately I already have drop of performance so I cannot play with that off because its worth... but with 10 players it's definitly better !