Miasma Community

Gaming Zone => Unreal Tournament 2004 => Topic started by: holyspam on November 19, 2019, 18:14

Title: How to reduce input latency and make the game smooth.
Post by: holyspam on November 19, 2019, 18:14
This is my first post on the forums, so hello to everyone.

I have written a modern basic optimisation guide for ut2004 which i also measured with my phone at 240fps and shock rifle primary to measure input latency both online and offline to make sure it doesn't make the experience worse.

(Recorded clicking my mouse in front of the monitor and then counted frames from the mouse click to the shock primary beam appearing)

I have also managed to find a way to run the game with its native DX8 implementation in fullscreen exclusive mode on windows 10, which cuts another 4-5ms of input latency compared to the dx9 wrapper or "fullscreen windowed" mode.

These tweaks combined allow for 4-8ms input latency in instant action, but the best i could manage online on a 3SPN server was 12-16ms, which i assume happens because of newnet taking an additional tick to process netcode's "startfire" function.

Here's step by step.

Step 1 (Windows 10 only):


Quote----=================UPDATE 2022==================----

You can run the game in 100% native DX8 mode, by grabbing the dll from the attachment in this link.
https://www.vogons.org/viewtopic.php?f=8&t=47772
Explanation is included in that link.

----==============================================----
While the DX8 API is what the game is made with and is more responsive, *your specific system configuration* might work best with the DX9 converter (https://github.com/crosire/d3d8to9/releases/download/v1.11.0/d3d8.dll).
Try them both for a few days


Find your installation directory. For example mine is "C:\UT2004\system"
Paste d3d8.dll inside the system folder.
Alternatively you can right-click on the "Play UT2004" shortcut and choose "Open file location" it will take you directly there.


Step 2 (FPS limiter):

For online play, the game will limit your framerate to a default of 90.
When your netspeed is lower than 10000, this can't be changed, but when netspeed is higher than 10k the game limiter will instead use the "MaxClientFrameRate" value.

The ingame limiter works in 1 millisecond intervals.
This means that the value you set in your ini as "MaxClientFrameRate" is converted into milliseconds. (1000/MaxClientFrameRate)

This results in the following fps limits ingame
100,112,125,142,166,200,250,333 which correspond to
10ms, 9ms, 8ms, 7ms, 6ms, 5ms, 4ms, 3ms.

In order to apply a limit of 100 fps, you should use your desired FPS +1 for "MaxClientFrameRate".
This means MaxClientFrameRate=101 results in 100fps ingame, MaxClientFrameRate=112 results in 111fps ingame, 126 for 125...etc...etc

You can use a limiter like RTSS instead, but you should know that it will increase your input latency by 1 frame compared to the ingame limiter, but you can use *any* value as the limit.

As you reach 200-250 fps, the game engine doesn't work that well because it syncs everything in one main thread and you will need a very powerful CPU(4GHz and above) that can finish all of its work in less than 4ms.

To change your fps limit, you can either find the line "MaxClientFrameRate=XXX" in ut2004.ini.
Or type this in the console ingame.
set Engine.LevelInfo MaxClientFrameRate XXX
Where XXX is your desired framerate.
The default limit is 90.

Increasing your FPS will also increase the amount of network updates to the server which will result in higher network latency.
Due to netcode, this is mostly irrelevant, unless you have data limits on your connection.
You can adjust the rate of network updates from F7, with the "Desired Net Update Rate" slider.
If your system cannot achieve the set framerate, it will drop to the next available FPS, this can create stutters and warps that lead to desynchronisation with the server, MORE is not always better.



Step 3 (GPU settings):

Nvidia
Go in Nvidia control panel.
Manage 3D settings.
Programs settings.
Choose the ut2004.exe profile, or make one.
Find an option named "Maximum Pre-Rendered Frames" or "Low Latency Mode".
This can help with games that can achieve VERY high fps like UT2004, but can mess with newer games.
DO NOT SET THIS GLOBALLY.
Change it to 0/1 or Low/Ultra.
Find "Power Management" and set it to Maximum Performance

AMD
One thing to enable, is called Radeon Anti-Lag.
Open Radeon settings.
Go in Graphics.
Find UT2004.
Check that Anti-lag is on.
The setting equivalent to nvidia's "Max pre-rendered frames" is no longer included in the settings, it requires a registry tweak and it's applied globally.
For this reason i will not provide a guide, but only the name of the program and the setting.
Use RadeonMod, find the value "FlipQueueSize"
I am using 0x3100 which is equivalent to nvidia's max pre-rendered frames of 1 or low-latency mode "Ultra".
Values are 0x3100 for 1 frame, 0x3200 for 2 frames and 0x3300 for 3 frames(also default), beyond that you're adding input lag.

Intel users, sorry. Get a real GPU. :D

Step 4 (Ingame):

Make sure "Reduce Mouse Lag" is not checked. (Settings->Input)

Best is to set all graphics settings to Lowest or off.


Step 5 (Windows 10+ only):

Right click on ut2004.exe, or the desktop shortcut, open Properties.
Go to Compatibility.
Check "Disable fullscreen optimizations".
Make sure everything else is unchecked.
IF YOU USE ANY OVERLAY, IT MIGHT CAUSE A SYSTEM/DRIVER HANG ON OLD DRIVERS.


Optional


For APU/iGPU users
Open ut2004.ini, find AvoidHitches=False make it True.
This will make the game keep everything into VRAM. It helps a lot on my integrated gpu.(ryzen 2200g)
Default is False.

1000Hz mouse users
If you have a 1000Hz mouse, open user.ini and find "MouseSamplingTime=" change it to 0.001 for 1000Hz, 0.002 for 500, 0.004 for 250.
Default is 0.0083

Potentially harmful tweaks
KeepAliveTime
No, that setting has absolutely no gameplay value.
It does exactly what it says it does - makes sure the connection doesn't time out and close if data is not being sent. (https://www.epicgames.com/unrealtournament/forums/unreal-tournament-development/ut-development-programming/3172-accuracy-of-hit-registration?p=93454#post93454)
This also doubles the amount of data you use and increases your ping.
AVOID IT.
Default is 0.2
Quote----================UPDATE 2022=================----
Miasma now provides a custom movement tickrate slider in-game(F7 menu) to achieve what everyone thought KeepAliveTime did.
----==============================================----
[/size]

Process priority
While it helps at first, it can cause synchronization issues after some time between the different components of the game, like network, input, audio and display. Better keep it default.


Running the game on one core
This provides the lowest input lag and most consistent feeling, but you leave a lot of performance on the table. You will need a very powerful CPU to maintain high fps - meaning 120 or more - in crowded servers and maps.

The reason is that UT2004 was coded in an era of single-core CPUs with frequency that remained at 100% and the game was targeted at Windows XP.

The timer function used by the game(called TSC or __rdtsc) is now considered legacy or obsolete and  is not accurate for systems with powersavings, turbo, or when the main game thread moves from core to core.
A way to get around this issue is disabling powersaving, disabling turbo, disabling C-states and using the windows "High Performance" or "Ultimate Performance" power plan.

To pin the game on one core, open task manager, find the game process(ut2004.exe), right-click, set affinity and select only one core.

There are also a few other tweaks like enabling MSI/MSI-X mode for your devices and using CPU affinity for USB controllers, but those are system-wide and might create issues with other games or programs, or make things worse if you don't know what you're doing.

Enjoy!
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: kops on November 20, 2019, 16:26
Thanks for posting this up here. It looks like a number of people have already found this helpful.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Piglet on November 20, 2019, 17:41
Questions:

1. How does the game know to use the dll?

2. What does the console command do? The variable is defined as "var globalconfig float MaxClientFrameRate;" - so I can't see what providing "142,166,200,250" to it is intended to do. It can only take a single floating point number.

3. How does changing MaxClientFrameRate through console have any effect different to just configuring it in the ut2004.ini file?

4. Changing MaxClientFrameRate needs to be done in conjunction with a change in netspeed to have any effect on uncapping the frame rate. Something like this is a good idea - press numpad 8 at the start of every map to take effect: NumPad8=Stat Net | stat fps | netspeed 10880

5. AvoidHitches? What is it and what dos it do? I can only see its value being reset in the code - so can't tell what it's doing.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Nardaq_NL on November 20, 2019, 18:06
1 I think its looking first in the root map (ut2004/system) and then looking for the DLL in the windows/system folder.
and which one to use?
[Engine.Engine]
-> RenderDevice=D3DDrv.D3DRenderDevice
-> RenderDevice=D3D9Drv.D3D9RenderDevice

2 The FPS steps has to do with this (https://www.utzone.de/forum/showthread.php?t=4326)

3 none  ;D

4 Yup, I use tab for that  "Tab=ScoreToggle | setspectatespeed 5000 | netspeed 15000" (setspectatespeed is also freeing handy)

5 see here (https://forums.beyondunreal.com/threads/guide-the-un-official-better-performance-and-gameplay-guide-for-ut2004-by-ddrre.127344/#post-1370878)

This will not apply for me as I'm still using Windows 7  8)
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Piglet on November 20, 2019, 18:47
Yeah but you can't set Engine.LevelInfo MaxClientFrameRate 142,166,200,250. You have to pick a value and match with netspeed
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: jiRNGen on November 20, 2019, 19:13
I use a 144 hz monitor and nice internet speed so  MaxClientFrameRate=250 and MaxClientRate=20000 or 30000 works perfectly for me. One important setting UseVSync=False (everywhere) will prevent a lot of input lag and add comfort especially when moving mouse around.





Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Piglet on November 20, 2019, 19:26
What's the reason for max rate over monitor refresh rate?
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: jiRNGen on November 20, 2019, 20:44
Quote from: Piglet on November 20, 2019, 19:26
What's the reason for max rate over monitor refresh rate?

I tried to set MaxClientFrameRate to 144 before and recently  200-250, i didn't see big difference.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: holyspam on November 21, 2019, 17:21
Quote from: Piglet on November 20, 2019, 17:41
Questions:

1. How does the game know to use the dll?

2. What does the console command do? The variable is defined as "var globalconfig float MaxClientFrameRate;" - so I can't see what providing "142,166,200,250" to it is intended to do. It can only take a single floating point number.

3. How does changing MaxClientFrameRate through console have any effect different to just configuring it in the ut2004.ini file?

4. Changing MaxClientFrameRate needs to be done in conjunction with a change in netspeed to have any effect on uncapping the frame rate. Something like this is a good idea - press numpad 8 at the start of every map to take effect: NumPad8=Stat Net | stat fps | netspeed 10880

5. AvoidHitches? What is it and what dos it do? I can only see its value being reset in the code - so can't tell what it's doing.

1.
For DX8 games the executable looks for d3d8.dll, if it can't find it near, windows handles it.(which also applies to all .dll files required by programs)

D3D8.dll is the name of the windows Direct3D 8 library responsible for rendering in DirectX 8 and DirectX 8.1 games.
It was used in Windows 98/XP maybe 95/2000 too, cant remember.

Even when DX9 released it support was provided for earlier versions.
The 32bit version of UT2004 uses DirectX 8.1

DX9 was not included in Win Vista and 7, there is only DX10-11 included and in order to play old games you have to install "DirectX 9 Redistributables" by yourself, which also provides support for DX8 and earlier, so this dll might not help much.

Then for windows 8/10 m$ decided that DX9 should "run" inside DX11...but only D3D9 is "properly" supported
They called it D3D9 Extended(D3D9Ex)

Using earlier versions of D3D you get something like an emulation inside D3D9Ex, which adds complexity in the rendering process and creates issues for old games, since it runs everything on D3D11.

So these guys got the SDK(software development kit) for DX8 and DX9 and instead of emulating DX8 or looking for quick solutions, they translated all DX8 code to DX9 which requires lots of testing and feedback, almost impossible for one person.

But the result is much faster than being emulated and allows you to make every game to actually work properly.

When people started using it for stuff like ReShade, it got lots of feedback and old games ran on newer windows without issues, they even fixed some graphics bugs in games while translating, even fixed some old unpatched crashes.

Anyway they put all of this inside a d3d8.dll so you won't have to mod your exe or any file.

So instead of this:
D3D8->D3D9
D3D9->D3D11
you get something like this:
(D3D8)D3D9->D3D11

For me this changes the game from MEGA stutters and lag, to super smooth.


2.
The console command can be used to change the variable MaxClientFramerate in class LevelInfo inside class Engine,
You can do this without exiting the game and opening the ini, that's the only advantage, but you have to do it in the server browser, otherwise it's blocked.
You can use this syntax for EVERYTHING inside ut2004 and user.ini:
set CLASS PROPERTY VALUE
CLASS is indicated inside brackets like [Engine.LevelInfo]
PROPERTY is plain text followed by "=" symbol and then the VALUE specified.

3.
Numbers provided are the limits that ut2004 actually enforces depending on system timer used, there are more details in "The holy grail of ut2004"
I think the render engine works at 1ms timers and you get one frame every X ms, which results in these actual limits.
8ms = 125fps
7ms = 142fps
6ms = 166fps
5ms = 200fps
4ms = 250fps
If i pick a framerate inbetween, it will oscillate between the two limits.

4.
Yes you need 10001 netspeed in order to unlock framerates higher than the default of 90(maybe 85 on certain systems), there is still a hard limit at 250fps with 10001 netspeed, but if you increase netspeed even more, the limit is what you set in MaxClientFrameRate.

5.
Well, it does what the name implies, it probably sacrifices some speed for consistency in framerates (the difference might have been bigger on older systems),  not sure on the technical side you'll have to ask Epic for that.
It will try to hold all textures inside VRAM, to avoid moving them back and forth. I was mostly testing various stuff from the .ini and noticed that when it's turned on it made my mouse movements smoother.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: hagis on November 22, 2019, 16:00
hello :)

I don't tend to mess with any settings generally but thanks for posting, it's interesting :)
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: holyspam on November 26, 2019, 23:24
One extra setting to reduce input lag for nvidia users.

DO NOT CHANGE GLOBAL SETTINGS FOR THIS ONE, IT MIGHT NOT WORK WELL FOR ALL GAMES.
THIS WILL DROP YOUR FPS BUT YOU GET FASTER FRAME DELIVERY


1.Go to Nvidia control panel
2.Manage 3d settings
3.Program settings
4. Find unreal tournament 2004, if it doesnt exist,  ADD IT.
5.Now edit ut2004 profile, find "Maximum pre-rendered frames" set it to 1.

That's it!

This might make a huge difference, depending on your setup.




For AMD users you need to edit registry or download radeonmod, i won't go into details because it's dangerous, the setting name is Flip Queue Size.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Piglet on December 02, 2019, 23:28
d3d8.dll has been causing GPFs for me.

Renamed it. GPF's stopped.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Nardaq_NL on December 06, 2019, 16:12
Anyone has a solution for this? It's making me nuts for a very long time.

I've no idea how others are able to shoot a close range to a moving manta for example, but i have to predict ahead for me able to hit anything.
(http://members.home.nl/nardaq/MIA/delay.jpg)

The aim is not off. Its the delay of shooting vs actual firing
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: jiRNGen on December 07, 2019, 00:20
Not sure if it's same as what i had, but i fixed it in input i disable  every fields.
And in ut2004.ini i changed set UseVSync=False everywhere.

Vsync adds a lot of input lag... it's unplayable for me.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Nardaq_NL on December 07, 2019, 12:29
Tried the dll file, fps v sync, got a new monitor, 64bit, and many other I've forgotten.
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Piglet on December 07, 2019, 14:00
I've never seen this problem
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: holyspam on February 14, 2020, 16:46
BUMP, can someone sticky this?
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: Piglet on February 14, 2020, 19:25
Maybe. I'm not entirely sure how much of the contents I believe though!
Title: Re: How to reduce ut2004 input lag - no placebo (Win8 and newer)
Post by: holyspam on February 14, 2020, 19:41
I can delete the prologue :P

edit: actually i can't edit my post
Title: Re: How to reduce lag and make the game smooth.
Post by: holyspam on June 27, 2020, 16:49
Edited for clarity, included additional tweaks you can do in the drivers and tweaks that you should avoid.
Title: Re: How to reduce lag and make the game smooth.
Post by: mustap- on June 28, 2020, 18:49
Great guide!
i had to put the desired framerate to 202 to get 200 in game ( nvidia user)

Title: Re: How to reduce lag and make the game smooth.
Post by: Blub on July 03, 2020, 19:33
I also applied some of this stuff to my setup - mainly the dll and the framerate. My aim still does not exist but I would like to imagine it helps me at least sometimes to escape the hax of some of you guys out there - feels more smoothly at least. Thx for putting it together.

@Piggy: any chance you can add a "thumbs up" smiley to the forum?
Title: Re: How to reduce lag and make the game smooth.
Post by: Piglet on July 03, 2020, 20:55
I want the old Titan smiley pack which someone did for us.

I didn't think to keep a copy
Title: Re: How to reduce lag and make the game smooth.
Post by: THOR` on July 04, 2020, 05:22
Didn't dub make those?
Title: Re: How to reduce lag and make the game smooth.
Post by: Piglet on July 04, 2020, 12:15
Yeh. Do you know how to get in contact with him? He may have them still!
Title: Re: How to reduce lag and make the game smooth.
Post by: nyrde on July 04, 2020, 14:00
I have to also give huge respect for holy for not being hax hoarder :D. He has helped to improve my gameplay a lot and it is great that we have so pedantic person on the community trying the improve the expercience for everyone.
Title: Re: How to reduce lag and make the game smooth.
Post by: THOR` on July 04, 2020, 17:30
Quote from: Piglet on July 04, 2020, 12:15
Yeh. Do you know how to get in contact with him? He may have them still!

Sadly I don't :(
Title: Re: How to reduce lag and make the game smooth.
Post by: kops on July 04, 2020, 18:08
All I remember is he was called Jan and was (I think) in Vienna. I'll try to track him down.
Title: Re: How to reduce lag and make the game smooth.
Post by: Piglet on July 04, 2020, 18:47
I've asked Keith if he still has a copy as I was emailing him anyway to let him know that the turrets now have horns ready for him....
Title: Re: How to reduce lag and make the game smooth.
Post by: Blub on July 04, 2020, 21:10
Quote from: kops on July 04, 2020, 18:08
All I remember is he was called Jan and was (I think) in Vienna. I'll try to track him down.

Do you have a particular set of skills in order to accomplish this task? O:-)
Title: Re: How to reduce lag and make the game smooth.
Post by: Veica on July 04, 2020, 21:37
Quote from: Blub on July 04, 2020, 21:10
Quote from: kops on July 04, 2020, 18:08
All I remember is he was called Jan and was (I think) in Vienna. I'll try to track him down.

Do you have a particular set of skills in order to accomplish this task? O:-)

Skills that make you a nightmare for people like him?
Title: Re: How to reduce lag and make the game smooth.
Post by: Blub on July 04, 2020, 23:54
Quote from: [MiA]Latte on July 04, 2020, 21:37
Quote from: Blub on July 04, 2020, 21:10
Quote from: kops on July 04, 2020, 18:08
All I remember is he was called Jan and was (I think) in Vienna. I'll try to track him down.

Do you have a particular set of skills in order to accomplish this task? O:-)

Skills that make you a nightmare for people like him?

Skills that make him the perfect candidate to take those smileys and bring them back.  :D
Title: Re: How to reduce lag and make the game smooth.
Post by: holyspam on November 18, 2020, 15:15
For Windows 10 May 2020 and later, there are now DX9-on-DX12 and DX11-on-DX12 native modes. Explanation (https://devblogs.microsoft.com/directx/coming-to-directx-12-d3d9on12-and-d3d11on12-resource-interop-apis/)
It is not globally enabled, each application has to specifically request it.
This (https://github.com/Joshua-Ashton/neun-auf-zwoelf/releases) file will request it.
QuoteJust download the latest release, copy the d3d9.dll next to the executable of the game you want to run, and start the game. Make sure to use the x64 one for 64-bit games, and the x86 one for 32-bit games (you probably want the latter).

UT2004 32-bit version is only DirectX8 which alone isn't enough to work, but it works in combination with d3d8to9.
(I always preferred the 32bit version, due to better audio and not randomly crashing.)

So far it has not caused any issue for me.
It's also allowing me to use radeon overlay without crashing or lagging.

Running a ut2004 12 bot match as benchmark with my settings returns these results (10 run average)
=============||MIN||=========||AVG||=========||MAX||==============
STOCK 50 262 356
D3D8TO9 78 308 420
D3D9ON12 107 314 443
==================================================================


Use at your own risk!!
Title: Re: How to reduce lag and make the game smooth.
Post by: Blub on November 18, 2020, 19:50
Quote from: holyspam on November 18, 2020, 15:15

[...]

Running a ut2004 12 bot match as benchmark with my settings returns these results (10 run average)
=============||MIN||=========||AVG||=========||MAX||==============
STOCK 50 262 356
D3D8TO9 78 308 420
D3D9ON12 107 314 443
==================================================================


Use at your own risk!!

Finally you reveal your hax level and how you monitor it.  >:D ;D

I might try this out the other day -I'm not unhappy how my game runs, but maybe this improves it further for me.
Title: Re: How to reduce lag and make the game smooth.
Post by: Piglet on November 18, 2020, 21:10
It works for me. You can just remove the dll's to swap between using them and not.
Title: Re: How to reduce lag and make the game smooth.
Post by: Stealer on November 19, 2020, 21:07
I find turning off the wifi helps, although the missus generally complains if she is still awake  >:D
Even with fast fibre, I was getting packet loss the other week, but then there are about 7 wireless devices on my network (phones, tv, laptop, printer, ipad thingies).
Title: Re: How to reduce lag and make the game smooth.
Post by: Molgan[ApA] on November 20, 2020, 00:05
Thank God I play on a mint install without tweaks or binds on a decade old laptop, no need to worry about things like this. It runs like crap no matter what.. :P
Title: Re: How to reduce lag and make the game smooth.
Post by: GPREZQ on November 21, 2020, 00:26
 :o  :'(  :))
Title: Re: How to reduce lag and make the game smooth.
Post by: nyrde on November 22, 2020, 16:19
For some reason, I think it forces my intel gpu (im not 100% sure) instead of nvidia and even the mouse in the main menu of UT is super laggy. I have forced nvidia for ut in nvidia control panel but still it doensnt work.
Title: Re: How to reduce lag and make the game smooth.
Post by: Annihilator on November 22, 2020, 17:07
Quote from: Molgan[ApA] on November 20, 2020, 00:05
Thank God I play on a mint install without tweaks or binds on a decade old laptop, no need to worry about things like this. It runs like crap no matter what.. :P
You play?  8)
Have yet to gut you...!
Title: Re: How to reduce lag and make the game smooth.
Post by: Molgan[ApA] on November 22, 2020, 22:52
Quote from: Annihilator on November 22, 2020, 17:07
Quote from: Molgan[ApA] on November 20, 2020, 00:05
Thank God I play on a mint install without tweaks or binds on a decade old laptop, no need to worry about things like this. It runs like crap no matter what.. :P
You play?  8)
Have yet to gut you...!
Lol. You wish. When I play, and it's sadly rare, I look up the most populated ONS server with a ping that doesn't suck and fire away. This covid thing has taken up way too much time lately (professionally) so my dreams of rebuilding slaughter and mapping skills have been a bit demolished. I had this great idea for a map that would work well for freezing activities, lots of Z, could post some screenshots of it but not in playtest mode yet. My son hates it still so need more work. 
Title: Re: How to reduce lag and make the game smooth.
Post by: Piglet on November 22, 2020, 23:29
Quote from: Molgan[ApA] on November 22, 2020, 22:52
I had this great idea for a map that would work well for freezing activities, lots of Z

Is it called something along the lines of "...Contrast..."?
Title: Re: How to reduce lag and make the game smooth.
Post by: Molgan[ApA] on November 23, 2020, 00:24
Quote from: Piglet on November 22, 2020, 23:29
Quote from: Molgan[ApA] on November 22, 2020, 22:52
I had this great idea for a map that would work well for freezing activities, lots of Z

Is it called something along the lines of "...Contrast..."?
Haha, nope, sorry. :D More like "vertically challenged"..
Title: Re: How to reduce lag and make the game smooth.
Post by: holyspam on January 09, 2022, 13:58
**Guide updated with some new discoveries**
Title: Re: How to reduce input lag and make the game smooth.
Post by: Stealer on January 11, 2022, 17:14
The "anti lag" option in ATi seems to make things less juttery for me. Thanks Holy.
Followed a few of your other instructions and that has helped a LOT, it's nice to be able to hit things again!!
Title: Re: How to reduce input latency and make the game smooth.
Post by: Piglet on April 02, 2022, 16:16
Wierd - I've been noticing I've been missing things more recently and found I'm somehow running at 30 to 60fps


I re-downloaded the two dll's from the start of this thread and still get same speeds. If I delete them I get wishy-washy screen colours, an odd-feeling game, but back to normal fps.

Not sure what's going on.
Title: Re: How to reduce input latency and make the game smooth.
Post by: Piglet on April 02, 2022, 16:27
and without the d3d8.dll in my system directory it feels like shiiit but at high fps. Sluggish display change. Grrr!
Title: Re: How to reduce input latency and make the game smooth.
Post by: Piglet on April 02, 2022, 16:56
PC restart made it better. Back to full fps with the d3d8.dll. Still feels really stuttery though. That could be me!
Title: Re: How to reduce input latency and make the game smooth.
Post by: Stealer on April 05, 2022, 18:20
Quote from: Piglet on April 02, 2022, 16:56
PC restart made it better. Back to full fps with the d3d8.dll. Still feels really stuttery though. That could be me!
Did you speak to the IT department? Did they tell you to turn it off then on again?  :))  Sorry couldn't resist the old IT joke/line : :)) O:-)

Glad it's working better for you dude.

I recently bought myself a new x570 mobo swapped everything over then realised my 1600 cpu wasn't supported  :)) ::) I've now got to get a new psu and cpu to go with the mobo  :)) :))
Title: Re: How to reduce input latency and make the game smooth.
Post by: Gil-galad on December 18, 2022, 16:47
Since I've had strange stuttering, de-synchronization, and input lag lately, I've looked a bit again at this thread. After my tinkering, I have :

[Engine.Player]
ConfiguredInternetSpeed=9636
ConfiguredLanSpeed=20000

[Engine.LevelInfo]
MaxClientFrameRate=151.000000


I chose this value for MaxClientFrameRate  because I realized that whatever ConfiguredInternetSpeed value you choose to write in your file, the server will overwrite. I've also used the slider made available on miasma freon server options, which goes up to 250, that will not translate in ConfiguredInternetSpeed=25000

The logic here would be, if I'm correct, that, say, if your desired fps is 250, you'd have to set your ConfiguredInternetSpeed to 251 x 64, so to 16064. I've set my fps at 151 because the value the server writes divided by 64 gives me that (9636 / 64=150.5625).

Having a higher fps than the refresh rate of your monitor, if I got it right, may be desirable to achieve lower input latency. However, as the ConfiguredInternetSpeed value will not stick, it seems to me that there's no gain for me to put a value higher than 151 in MaxClientFrameRate. The previous understanding that you had to choose ConfiguredInternetSpeed=20000 to unlock higher fps online seems to be not recommended anymore, since the server lowers it.

Hardware context, if relevant :
My CPU (AMD Ryzen 7 5800X) is somewhat more recent than my GPU (ASRock Radeon RX 5500 XT), and my screen has a 144 Hz refresh rate, pixel count of 4K.

What values would you choose? Did I get something wrong?
Title: Re: How to reduce input latency and make the game smooth.
Post by: Grim_Fandango on June 12, 2024, 01:53
You might be able to squeeze out a few more FPS's by changing the monitor cable.
I found out today that my max res' via HDMI was 3440 x 1440 @ 85Hz, but using Display Port it jumps to 100Hz.

It's also worthwhile checking the refresh rate is set to the highest in Windows.
Title: Re: How to reduce input latency and make the game smooth.
Post by: Stealer on June 13, 2024, 20:59
Aye you are right hdmi won't support over 60hz I believe, it's got to be displayport for over that. I've found some variation in display port cables as well. First one I bought only supported 85hz, bought another and now play at 144hz fine. I've got an msi display app to set my refresh rate.
Although I only just wondered if the refresh rate is set in the user.ini of ut2004 - anyone know?
Title: Re: How to reduce input latency and make the game smooth.
Post by: Veica on June 14, 2024, 14:07
It depends on the version - HDMI 2.1should have no issue running 4K up to 120hz with HDR, but 2.0 and earlier do not have the bandwidth to support more that 4K at 60hz or smaller resolutions at higher refresh rates

Source: I struggled with an HDMI 2.0 Nvidia GPU for years until I upgraded recently to a card with HDMI 2.1
Title: Re: How to reduce input latency and make the game smooth.
Post by: Grim_Fandango on June 14, 2024, 18:04
I'm in a continued battle trying to squeeze each and every little frame from my machine.
I've followed umpteen guides, tried 64 bit, OpenGL, swapping cables, monitors, widescreen fix, setting in-game graphics to low and unchecking all the usual suspects, but my fps never seemed to settle until I dropped the screen res and swapped the HDMI for a DP cable.

My current config gives me avg 115 fps running ut2004(D3D 1024x1080), and 175 fps in 64bit (OpenGL 1920x1080) all on low graphic settings.  I could go lowest, but that sacrifices too much of the visual splendour :)

I was using high graphics on my 35" ultra-wide screen, but was only getting around 85fps at 3440x1440.

I'm not a religious man, but I'm certain I prayed once...definitely swore lots of times!

I'm getting in the 200's on my gaming laptop on highest settings and it plays buttery smooth.
Still can't hit shit though :(


Quote from: Stealer on June 13, 2024, 20:59
I only just wondered if the refresh rate is set in the user.ini of ut2004 - anyone know?

You can tweak settings in UT2004.ini, or ut2004-win64.ini for 64 bit.
These are mine for now:

[WinDrv.WindowsClient]
MinDesiredFrameRate=201.000000

[SDLDrv.SDLClient]
MinDesiredFrameRate=35.000000

[Engine.LevelInfo]
MaxClientFrameRate=201.000000
Title: Re: How to reduce input latency and make the game smooth.
Post by: Grim_Fandango on June 14, 2024, 22:50
I prefer running the 64 bit version in OGL, but I cannot get text to speech to work.
Title: Re: How to reduce input latency and make the game smooth.
Post by: holyspam on June 19, 2024, 22:44
64bit version:
does not have positional audio
timing is slightly off
crashes randomly

there's a custom patch out there for the 32bit version with raw mouse input and high precision timers support
i suggest to use that together with d3d8to9