My apologies if this has been asked before. I noticed the game is locked at 125/126 FPS and I was curious if there is a way to unlock the frame rate or set it to a higher number. If so, how would one do this and is there any negative effect that could take place? Is there a specific reason this number was chosen for the frame rate?
Thanks jlv
Locked Frame Rate
Re: Locked Frame Rate
The physics run at 128 Hz which is the slowest rate I could get away with without having the wheels rotate too much per step for a stable simulation. It would be possible to make the game interpolate frames to get a higher framerate at the cost of a physics step of latency but right now it doesn't have that capability.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
-
- Posts: 133
- Joined: Mon Sep 28, 2020 7:08 am
Re: Locked Frame Rate
Ah, gotcha. A lot of complicated coding it sounds like. I trust your decision making regarding the efficiency within the physics engine so I will gladly accept this response. Thanks asgain.jlv wrote: ↑Tue Feb 09, 2021 1:55 am The physics run at 128 Hz which is the slowest rate I could get away with without having the wheels rotate too much per step for a stable simulation. It would be possible to make the game interpolate frames to get a higher framerate at the cost of a physics step of latency but right now it doesn't have that capability.
-
- Posts: 1610
- Joined: Sun Nov 04, 2012 2:25 am
- Team: Phil's
- Location: Vancouver Island
- Contact:
Re: Locked Frame Rate
Are you ever planning on converting the game to operate at a higher frequency? Say for example 256hz?jlv wrote: ↑Tue Feb 09, 2021 1:55 am The physics run at 128 Hz which is the slowest rate I could get away with without having the wheels rotate too much per step for a stable simulation. It would be possible to make the game interpolate frames to get a higher framerate at the cost of a physics step of latency but right now it doesn't have that capability.
Also, taking a game like CSGO for example, what frequency would that run at? Because sometimes I can get up to 500fps on that game, would that mean the game is written in 500hz? 1000hz? What would it take to get mxs to run at 256hz so we could run 240fps? Im drooling just thinking about the possibility of lower latency in mxs. Would help consistency in pro racing a lot I think, lower latency would allow us to have a little faster reaction time for avoiding carnage.
Tanner Rogers
Re: Locked Frame Rate
128 Hz is good enough for motocross speeds. It'd definitely need 256 for road race speed. The reason I don't just run the higher rate is the physics rate is a real time requirement. The client can't fall behind or else it'll run in slow motion, so the rate has to be low enough that the slowest system can manage it. It's not flexible like the FPS.
I just looked it up and apparently CSGO runs at 64 Hz and interpolates to get higher framerates. I could do the same thing in MXS but it'd cost a step of latency.
I just looked it up and apparently CSGO runs at 64 Hz and interpolates to get higher framerates. I could do the same thing in MXS but it'd cost a step of latency.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
-
- Posts: 1610
- Joined: Sun Nov 04, 2012 2:25 am
- Team: Phil's
- Location: Vancouver Island
- Contact:
Re: Locked Frame Rate
Makes sense! Pls don't do anything that adds any sort of latency thoughjlv wrote: ↑Thu Feb 11, 2021 1:49 am 128 Hz is good enough for motocross speeds. It'd definitely need 256 for road race speed. The reason I don't just run the higher rate is the physics rate is a real time requirement. The client can't fall behind or else it'll run in slow motion, so the rate has to be low enough that the slowest system can manage it. It's not flexible like the FPS.
I just looked it up and apparently CSGO runs at 64 Hz and interpolates to get higher framerates. I could do the same thing in MXS but it'd cost a step of latency.
So physics at 256hz would be something added after the game is optimized to run on multiple cores or something right? Theoretically, since we are currently locked at 128hz and 125fps, is there any way to set up our computers for minimal latency possible in mxs? Aside from the "Ultra low latency mode" in the Nvidia control panel?
Tanner Rogers
Re: Locked Frame Rate
It'd be really hard to notice 8 ms of latency. Average human reaction time is a quarter second, so we're talking about the difference between 250 ms and 258 ms.
Threads could help by making other stuff run in parallel, but the physics solver itself couldn't be easily threaded.
There's a command line option --glfinish that might remove a little latency. It asks OpenGL to wait until the command buffer is empty before continuing when it finishes a frame. So that might give you a slight latency improvement at the cost of throughput. I wouldn't recommend it though.
Threads could help by making other stuff run in parallel, but the physics solver itself couldn't be easily threaded.
There's a command line option --glfinish that might remove a little latency. It asks OpenGL to wait until the command buffer is empty before continuing when it finishes a frame. So that might give you a slight latency improvement at the cost of throughput. I wouldn't recommend it though.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.