Currently we don’t have a way to know when an input (mouse, keyboard, etc.) was made with greater resolution than the framerate of the player’s client.
Several competing ideas for implementing this API are:
-
InputObject.TimeOfInput
vsInputObject.TimeSinceInput
. Because there are multiple ways to get the current time in roblox (time(), os.clock(), etc), it can be ambiguous as to what flavor of time an absoluteTime is using. -
InputObject property vs second argument given by input signals, such as
UserInputService.InputBegan:Connect(function(inputObject, timeSinceInput) end)
.
We are aware the final implementation is up to Roblox engineers, so these are just some of the ways we see to handle it.
Here are some examples of how this issue arises in competitive First Person Shooters.
-
Sub-frame mouse movements are all aggregated onto the previous frame, resulting in a loss of accuracy in the true mouse movement initiated by a player. This is especially noticeable at low framerates, but we could fix this if we had access to an “InputObject.TimeSinceInputUpdate” property. Better yet, if we also got every sub-frame mouse movement, and not just the aggregated movement.
-
Whenever a person swipes with their finger on mobile, it is currently impossible to accurately compute a velocity for the swipe. This is one of the major reasons why a mobile FPS camera controls on Roblox remain clunky to implement.
-
When pressing a movement key (like jump), we must assume either that the input was made at the time of the previous frame, or the next frame. In the latter case, the player may have already moved 0.5 studs off the edge of a platform and missed the opportunity to jump.
We have been working on a tick-rate less system for our own shooter for the past two years, but we’re unable to take full advantage of our system because Roblox doesn’t offer a way to determine accurate sub-frame timestamps for player inputs.
With the recent announcement of Valve’s Counter-Strike 2, we can see that even Valve is starting to implement their own version of a tick-rate less system. We foresee this will be the new industry standard moving forward and so it would be beneficial for Roblox to give us the tools to keep up.