Gaming Zone > Unreal Tournament 2004
How to reduce input latency and make the game smooth.
holyspam:
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.
----==============================================----
--- End quote ---
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.
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.
--- Code: ---set Engine.LevelInfo MaxClientFrameRate XXX
--- End code ---
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
--- Code: ---AvoidHitches=False
--- End code ---
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.
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.
----==============================================----
--- End quote ---
[/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!
kops:
Thanks for posting this up here. It looks like a number of people have already found this helpful.
Piglet:
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.
Nardaq_NL:
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
3 none ;D
4 Yup, I use tab for that "Tab=ScoreToggle | setspectatespeed 5000 | netspeed 15000" (setspectatespeed is also freeing handy)
5 see here
This will not apply for me as I'm still using Windows 7 8)
Piglet:
Yeah but you can't set Engine.LevelInfo MaxClientFrameRate 142,166,200,250. You have to pick a value and match with netspeed
Navigation
[0] Message Index
[#] Next page
Go to full version