Input Lag - haxball/haxball-issues GitHub Wiki

Input lag is the name for the delay between you doing some input (like pressing a key or moving the mouse) and some action manifesting on the screen.

Unfortunately input lag is not directly under the control of web apps, browsers have inherent input lag.

You can measure your browser's input lag using this site: https://basro.github.io/input-lag-measuring-tool/

Luckily, there is a launch setting for chromium-based browsers that seems to greatly reduce input lag.

disable-frame-rate-limit

chrome.exe --disable-frame-rate-limit --use-angle=d3d9

Warning: this setting will uncap the framerate of your chrome browser making it use a lot of CPU and GPU resources. Only use this setting when playing haxball, disable it during regular browsing.

Usage instructions for windows:

  1. Open file explorer and locate the chrome executable (can usually be found in the path C:\Program Files (x86)\Google\Chrome\Application)
  2. Right click chrome.exe and select Create shortcut.
  3. Right click the shortcut file and select Properties.
  4. Add --disable-frame-rate-limit --use-angle=d3d9 at the end of the Target field.
  5. Make sure to close any running instances of chrome and then execute the shortcut.
  6. Open the input lag measuring tool and verify that the FPS is higher than normal, then measure your input lag with it again, it should now be lower.

image

About --use-angle=d3d9

On windows chrome will normally uses Direct3D 11 as it's renderer. However, with frame rate limit disabled this renderer will freeze when playing HaxBall. Switching to the Direct3D 9 rendered fixes the problem which is why this flag is added.

If you are in some other OS like Linux or MacOS you should not add this flag.