Significant input delay ( Camera Lag )

I see the workaround working, but for FPS games, having a lower FPS gives a slight disadvantage. Though it does reduce input lag, it can still can cause a significant disadvantage.
The workaround will be ineffective on lower end machines if they are unable to reach 30fps in the first place.
@subcritical did comment on the thread a while ago but we have not since got an update on the situation so to me it appears like it’s just been ignored, forgotten about or chucked at the bottom of the pile of bugs to fix though I may be wrong. Hopefully it can be fixed at some point as it is irritating to watch your inputs still being done about five seconds later is quite frankly annoying.

It’s gotten to the point where games are almost unplayable with the amount of delay sometimes reaching up to multiple seconds, this needs to be fixed.

1 Like

@Vmena, @JavascriptLibrary,

Cause of the issue

I found out that having a 1000hz gaming mouse can be the cause of the engine inefficiency issue.
Lowering your mouse polling rate to 500 or 250 reduces the chance of your inputs being delayed by quite a lot.

The problem has mainly to do with our local machine and/or Roblox Lua not keeping up with the amount of updates our input device is sending to the engine.

If your game contains a lot of Lua heavy tasks, (which a lot of Roblox Action games do with their raycasting and lots of moving Roblox physics, and spawning Instances) it’s likely the reason why the input updates can’t keep up and cause the input queue effect.

What the user can do

Lower your mouse’s ‘polling rate’ to 250 or 500.
Windows does not have a way to lower your mouse polling rate. You will have to download your mouse company’s software and check for any available settings, or use a different mouse entirely.
Alternatively you can (and should) put your Roblox Client into ‘True Fullscreen’ mode (Alt+Enter) to severely reduce the amount of latency you can build up.

What the Developer can do

I recommend optimizing your game to reduce Lua heavy tasks such as:

Optimizing Physics
Optimizing Physics calculations by making object hitboxes less complex. Turn off CanCollide for complex objects (such as fine detailed Models or Unions/MeshParts) and replace it with a invisible ‘barrier’ brick.

Reduce spawning Instances
Reducing the amount of instances you spawn into workspace. Try to avoid rapidly destroying and re-parenting instances in and out of workspace. Instead try to re-use existing (hidden) instances, also referred to as “object pooling”.

These two tasks are the most CPU intensive from my testing, and when implemented correctly avoids building up large input queues.
However, even with these efforts you will likely still have a major(30-70ms) input latency as the source inefficiency can only be avoided by the user’s changing their mouse polling rate.


This is not a real solution.

Bottom line is that this is not something every user or developer can do.
Therefore I endorse the suggestion that this problem should be solved on Roblox their end.

13 Likes

From your findings it appears like it is struggling to process data fast enough when polling rate is above 125HZ. So basicly being overloaded with data. Sadly some people do not have such settings available to them with their mouse so something still needs to be done on Roblox’s end

3 Likes

Very fair point.

Even with all the optimizations the developers can do, the user will likely still have 30~70ms input latency in the average servers due to the source of this inefficiency.

If the user cannot lower their Polling rate to a value low enough to match the engine’s capabilities, then there’s no solution to this issue.

Therefore I have untagged the “Solution” from this post.

1 Like

New optimization

Thanks to @martinpvik for this find!
For anyone still watching this topic; putting your Roblox Client into ‘true Fullscreen’(Alt+Enter) will severely reduce the input latency from Martin’s and my testing.

Reducing your Polling rate to 250hz will still be the best solution, but in combination with a Fullscreen client you will not build up higher than ±320ms client latency.

I have updated the Cause of the Issue report with this information


Notice on Roblox’s fullscreen

There seems to be a difference between using Alt + Enter and F11 to go into ‘Full screen’.


The hotkey F11, or ‘Fullscreen’ option in the in-game settings might not be ‘true Fullscreen’, and instead be what most games call ‘Windowed Borderless Mode’ or ‘Borderless’ for short.
To gain a ‘true’ Windows based Fullscreen Roblox Client, you will need to use to shortcut Alt + Enter while in-game.

At the moment this is based on assumptions. However, It can be measured that Alt + Enter has more of a positive effect for your ‘Button To Pixel’ input latency than F11.

The benefit of Fullscreen versus Windowed Borderless has been studied and observed to have a measurable difference when it comes to Input Latency.

5 Likes

Release 447 has some good news


This change has significantly reduced input lag! (with a catch)

After some testing, I was quick to realize the problem isn’t entirely solved, especially for developers who use Scriptable camera type.

This only benefits the user under the following conditions:

  • The Developer is using the default Custom CameraType
    + (and one of the following)
  • The User is holding down Right Mouse Button
  • The User is in First Person
  • The User is making use of Shift Lock
  • *Touch inputs untested

Note for developers:

This improvement only works with the Custom CameraType selected (ClassicCamera Module Script).
When the developer set the Camera to the Scriptable CameraType, this improvement in the camera input layer will no longer benefit the user.

I could not quite identify the reason behind the scenes to why this happens or how the improvement works from reading the CameraModule scripts, but it does look like they figured out a way to significantly improve the input queue issue as I was only able to build up to 800ms latency with the Custom CameraType.
Hopefully there is a way to get this improvement into our own camera scripts-

4 Likes

Its back now and its even worse. Input delay is 10 - 30 seconds long and it lags my whole system too! Its only when I close out roblox everything is fine but when its opened (client) my ENTIRE system is laggy and slow and my mouse movement is delayed and laggy too.

4 Likes

This is still a problem with medium to big games, and is extremely annoying. Another suggestion I’ve heard is to lower your graphics to minimum, and then back to where you had it. This only works for some people. As also mentioned, ALT+ENTER is a lot better than F11, and in my case, ALT+ENTER improved performance compared to windowed mode.

ROBLOX, please, fix this. Its been a problem for over a year, and input lag like this can make or break an entire game, and is a pain for developers, because this shouldn’t be a problem that we need to tell players how to work around.

Either way, thank you ROBLOX, for making such a great engine to connect people, especially in times like this.

4 Likes

I have been experiencing this issue for awhile now, I thought it was something wrong with my computer but it was not, I also use a gaming mouse, its a Razer Basilisk, but I have been experiencing this issue in almost all games on Roblox, even a simple baseplate. (My computer is running at playable frame rates, also it seems like Studio doesnt have any input lag, as I tried play testing the same game in both Studio and the Game Client).

2 Likes

In the razer software you should be able to reduce the polling rate to solve the issue - what I do on my Roccat mouse is have a preset for Roblox and then a preset for everything else. Roblox preset is just the same as the other but with a reduced polling rate (125hz) and it works completely fine.

2 Likes

This is an issue I seem to be getting as well, Adjusting the mouse polling rate to a lower number does seem to slow down how quickly the input lag appears .

I’ve noticed that its only with the Roblox Client as I’ve had the exact same games open in Studio and have had no such effect.

I’ve also noticed that these delays are carried outside of just the roblox application but also causes input delays on Discord and requires closing of the Roblox Client to remove the delay.

2 Likes

Hm, I saw someone with the same issue on Minecraft. Except there, it’s wayy worse.

I hate to revive a topic but this bug is still very real in some form. My old mouse died, and my new one causes this issue. It seems to behave as described by all the research done in here from the interactions with the framerate uncapper as well as the effects of changing the polling rate. It makes games feel very unpleasant. Has any progress been made on this issue since this thread died out?

1 Like

To my knowledge there has been nothing done and this sat dead.
Not entirely sure what the cause is, we just know that mouse polling rate is a factor

2 Likes

I am experiencing this issue. I thought it was the game I’m developing, turns out that it also happens on other games. I lowered my polling rate to 125 and the input delay went away.

This is problematic because not all people can lower their polling rates…

3 Likes

I’m experiencing this issue now, it still hasn’t been fixed. When my fps goes below 60 sometimes I get extreme input delay with both my mouse and keyboard.

3 Likes

The only thing we can recommend is turning your mouse polling rate down to 125hz if possible. Can’t do much until this is investigated further.

2 Likes

Yeah, this does solve the issue however it’s really annoying having to turn it down to 125 every time this happens. The best way to solve this is to just turn your graphics down till it goes away.

Are there any updates on this? I have started noticing this issue way too much in the game me and my team are working on that it almost makes the game unplayable at times and the only work around is to lower your graphic settings, even though my fps is at a stable 58-60 the input delay is too noticable.

I believe this would annoy so many players considering that now many of them have a decent mouse when they are using their computers.

This issue shouldn’t be left in the dark for so long just because we can avoid it by lowering our polling rate.

Update:
I’ve asked my friends that played the same game and it seems to be an issue with my pc, it’s got pretty old parts after all.

3 Likes