It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
It seems that there are a number of various posts on all sorts of forums about improving performance or whatever to fix lag/framerate stutters. None of them work. This is the actual fix.

TL;DR: Run OBS (you don't need to record, just have it running). Trust me, it works.

Other things help for some bits (like the single processor mode should not be the default, so you should absolutely change that - I think this helps with the frame drops when using a portal), but none are complete solutions. Disabling VSync helped, but didn't get rid of it for me (and in at least one older build, it also unlocked the physics rate, which meant ragdolls were instant and projectile weapons were functionally hitscan - this thankfully seems to have been fixed).

However, I happened to run it with OBS most recently and didn't notice any issues. I ran it without OBS and had the lag. If you want a video explanation, see this video by Pixelmusement (I'm not him, but I watch his content).

Yes, this does fix the issue. Yes, it's a core engine problem. It should be a relatively easy fix, though, for the devs. You just need to call timeBeginPeriod at the start of the program (and timeEndPeriod on shutdown).

For those of us without source code access, this is a global (system-wide) configuration. So as long as at least one app sets this appropriately, you're good. OBS does that. So the easiest thing to do for all of us is to just run OBS while playing the game. You do not need to record or do anything like that. You just need to have it running.

Hopefully this helps some people with this (annoying) issue. And maybe the devs can fix the engine.
Post edited May 01, 2023 by Singular8ty
It makes absolutely no sense for OBS to make the game run faster. If anything, it should make the game run slower due to using more resources.

I strongly suspect that your problem is that your GPU is downclocking without OBS on. This is common due to bad drivers + old games that are not graphically intensive. It is easily solved by going into nvidia control panel or amd adrenaline and setting your GPU to run the game at max performance (just google for instructions or ask in any gaming related discord, should be easy to find).

The reason why OBS is making your GPU run faster is that it is demanding more resources, so your GPU increases its speed and the game runs smoother. But a better solution is just to make your GPU run at a faster speed via settings.
I tested it. It's not that. At least not entirely. EVGA Precision sets timeBeginPeriod, too, actually, but I monitored the clock. Without OBS it liked to downclock when I had menus open more than with. Opening menus is also what triggers the issue (usually the inventory is what I found); however, that's not the main issue.

In any case, this is the code to fix 99% of the lag:

#include <Windows.h>

#include <iostream>

int main()
{
timeBeginPeriod(1);
std::cin.get();
timeEndPeriod(1);
}

It works. This is the fundamental bug. Period. OBS just happens to set this (1 isn't the best value, but it's the most extreme to prove a point). (True, there is still a little lag after closing the menu, but it gets back in sync after a frame. OBS also fixes this, and that likely is the GPU clock; however, when people talk about lag in this game, that's not what they're talking about and it's pretty unnoticeable.) What people talk about is lag that sticks and makes the game near unplayable. Those 2 API calls fix that completely. That's it. It's a simple bug with a simple fix. OBS happens to do the best job also because of the clock but compile the above program and you'll be much happier than without, too. Or open EVGA Precision. Or any number of programs that set this to a low value.

Edit: formatting the code better. Does GOG forums support markdown? Probably not....
Edit2: Nope. RIP. And it still doesn't like the leading spaces. I'll just simplify the API call to not check for error.
Post edited July 06, 2023 by Singular8ty
avatar
Singular8ty: It seems that there are a number of various posts on all sorts of forums about improving performance or whatever to fix lag/framerate stutters. None of them work. This is the actual fix.

TL;DR: Run OBS (you don't need to record, just have it running). Trust me, it works.

Other things help for some bits (like the single processor mode should not be the default, so you should absolutely change that - I think this helps with the frame drops when using a portal), but none are complete solutions. Disabling VSync helped, but didn't get rid of it for me (and in at least one older build, it also unlocked the physics rate, which meant ragdolls were instant and projectile weapons were functionally hitscan - this thankfully seems to have been fixed).

However, I happened to run it with OBS most recently and didn't notice any issues. I ran it without OBS and had the lag. If you want a video explanation, see this video by Pixelmusement (I'm not him, but I watch his content).

Yes, this does fix the issue. Yes, it's a core engine problem. It should be a relatively easy fix, though, for the devs. You just need to call timeBeginPeriod at the start of the program (and timeEndPeriod on shutdown).

For those of us without source code access, this is a global (system-wide) configuration. So as long as at least one app sets this appropriately, you're good. OBS does that. So the easiest thing to do for all of us is to just run OBS while playing the game. You do not need to record or do anything like that. You just need to have it running.

Hopefully this helps some people with this (annoying) issue. And maybe the devs can fix the engine.
I literally logged in just to thank you, even in such an old post. This indeed works, even for the Steam version of TQ. Thanks a lot!
Post edited February 29, 2024 by mmpmathias