In the recent years, some of the higher quality FPS games started separating their engines into different parts, where they run input/character physics/rendering at different processing rates. This makes these games less dependent on having a good PC because even if a player has low rendering FPS, the overall input/hit registration/RPC latency remains relative low and constant(click to photon latency high, click to action latency low), given the game loop/input loop/physics loop run at 1000 FPS.
I was wondering how hard would it be to modify the Godot engine to behave this way? I don’t really understand c++ and definitely not threading, but reading the blog posts about how Godot’s multithreading works, it seems to me it should be possible, given the server based architecture?
I seen people mentioning set_use_ accumulated_input(false), or physics_loop, but these provide absolutely no benefit when it comes to latency. Accumulated_input only benefits drawing accuracy and not latency, the inputs are still buffered until the next frame, and a new frame iteration can only happen when both idle, rendering, and physics loop finished its work, so the entire system latency will limited by the slowest part.
Physics loop can technically run at higher rates, but its fixed by delta time, and not delta time + wall time, which means it will simulate lets say 3 physics step within 1 ms, then sleep for 30 ms, depending of how slow the rendering compared to physics and how many physics calculations are needed per seconds. This is not a reliable solution, and also I don’t think it refreshing the input events unless agile input is implemented(which only works for android).
Is this important? Honestly, for many games I don’t think it is. But there is a reason why FPS games started doing this. Its a more fair system, and I would love if Godot could provide a similar system. This could be useful for every FPS multiplayer game, for driving simulator games(some of them has this system on consoles already), maybe even platformers.
Just for example: FPS game on Steam Deck, 45 FPS, 22 ms between every frame. If a person gets unlucky, sends input right after the tick, gets full 22 ms penalty. This added to network latency + then server processing can add up to quite a bit. Also, since the game ticks at 45 Hz, even if the physics is at 90 rate, the hitreg wont be consistent given we cant tell when exactly the input happened. There are proposals to give time data to input events(which could be used to calculate accurate position for enemy players to ray trace against), while this would help making hit reg more accurate, running the input polling at 1000Hz for example could still give lower latency.
I don’t want to open a proposal because im pretty incoherent I feel like, and I think there are few proposals that might addressing this exact issue, but im not sure. So the core issue I think is different servers wait on each other to finish. Maybe they could just sync with each other in a blocking way like it happens now, but then let each other work, and give them separate max_fps property? Like idle_loop_max_fps. Why does the entire engine has to wait on renderer to finish?
Some games that have this kind of input system:
Reflex Arena
https://www.reddit.com/r/reflex/comments/499s68/regarding_the_responsive_input_in_reflex_official/
Overwatch ( New Feature – High Precision Mouse Input )
Counter-Strike 2(not sure tho, they might only do input events with timestamps?)
Quake3e
Diabotical