Let's talk about the horrendous input lag in Chrome

0 favourites
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • In a nutshell, here's the issue:

    • In Chrome, low FPS sometimes gives very noticeable input lag.
    • This input lag only occurs when the GPU is the bottleneck. CPU lag has no effect. Specifically, it seems to be tied to fillrate.
    • To try the issue for yourself, click here in Chrome or download the attached capx.
    • The issue remains in Chrome Canary. In testing with Airscape, Canary actually gives far worse input lag.
    • In firefox, there's no input lag. In IE, there maaaay be a tiny little bit, but that could be my imagination.

    These factors lead me to assume that the input lag issue might be related to these issues.

    It appears that the input lag is partially dependent on other factors not explored in my demo, as in Airscape the lag is far greater at equal FPS. I can't really confirm this easily though.

    In the capx, the red line indicated reported FPS, and the green line is 1/dt. These values should be basically identical (allowing for a slight bit of variance).

    One thing to note is that there's (AFAIK) no way to objectively and accurately measure input lag. Anyone know of a way?

    Any thoughts about this whole issue? Any way we could get a repro to the Chrome people, and tell them that they are performing far worse than IE and firefox in this regard?


  • It seems that Chrome and Node-Webkit should be deprecated

  • In your example on both Chrome 39 stable and Canary I don't see any unusual input lag. I tested on a Windows 8.1 laptop with dual GPU (Intel HD graphics / nVidia GeForce GTX 675M). So I'd guess this correlates to certain system configurations.

  • sqiddster

    I checked your demo against an array of PCs here at the office, a mixture of windows and linux, running various flavours of regular chrome, canary, (both on windows) and chromium (on linux). All behave perfectly fine without input lag.

    Noteworthy maybe that all machines have nvidia graphics (of various ages) with clean driver installs.

    Still would be interesting to know under which conditions exactly this goes wrong.

  • Tried on my laptop (an HP 630 notebook PC, nothing big of a computer http://www.cnet.com/products/hp-630-15- ... ies/specs/ I think this is the correct informations. ), around 30 fps (varying), I can notice an slight input lag but playable without much issues (I had much more trouble on other games that were not stresstests).

    Chrome Version 39.0.2171.95 m.

    Graphic driver around 1 year 9 month old IIRC (that does not help).

    Will try on firefox and opera.

    Firefox: No input lag noticed.

    Opera: around the same as chrome.

    I'd say worthy of a bug report to chromium team if someone knows how to do that.

  • sqiddster

    I've been sticking with nodewebkit 10.5 for a while now, so I decided to have a look at how Chrome is evolving. (spoiler: I feel like I'll stick with nw export 10.5 forever)

    Just tested your demo on my most powerful laptop.

    Windows 7, Nvidia 680M, all drivers/windows components up to date.

    Canary: Version 40.0.2193.0 > horrible input lag.

    Canary: Version 41.0.2256.0 > 30fps visually feels like 10fps as usual, but inputs are ok.

    Chrome Version 38.0.2125.122 > 30fps visually feels like 10fps as usual, but inputs are ok.

    Chrome Version 39.0.2171.95 m > horrible input lag.

    i don't know if it helps, but just so you know, you're not crazy : )

  • Just had two friends test it on their machines (PC and mac), both reported ~100ms input lag.

    As I said before, it's very annoying that it seems there's no way to actually measure input lag. Is this true? or is there some way to do it?

    And yes, as Aurel rightly points out, the game looks like absolute trash visually at anything lower than 60fps. I think the official statement here is that this issue was fixed in Canary but there are clearly still severe issues. I'm still getting HUGE dt variance in Airscape in Canary. I'll try to get a minimal repro together of that in C2, since the Airscape issues are waaay worse than the issues in the demo, and I have no idea why. This seems to be a recurring issue, as Aphrodite and Aurel could also point out - real games for some reason struggle a lot more with amplified versions of the problems created by this issue.

  • Can't agree more, it's sure for months now, C2 is fantastic but "rich" C2 games have to be 60fps or nothing. As soon as frameskip happen, everything goes bad (jerkyness, inputs, col checks) like no other engines. I'm absolutely not pointing C2 for that, just the browsers / wrappers.

    tbh, I just sent a new press preview build, and I'm very, very frightened because of the live streams. The game runs fine on most computers now, even on weak ones, but I already know it will look ugly on the framerate side because of the ressources needed for the capture / streams : /

  • sqiddster I think fps is just a variable that counts each secon ds how many refresh occured during the last second.

    Gonna try the same canary version as Aurel to see if indeed the last one corrects that input lag.

    EDIT: It is better in canary 41, but I can still feel it

    Aurel : does this bad framerate issues also happen on firefox? on my side firefox seems pretty stable, while chrome... does whatever he wants basically, because if we could do something based on another engine than chrome that does not tends to break things like chrome does, thta would beenfit greatly..

  • Aphrodite No input lag in Firefox indeed.

  • Yeah, Firefox is totally fine.

    What Aurel said is basically the situation as I'm seeing it too. 60fps+, everything works great. But, as soon as we start to dip below that, things start going haywire. Things like livestreams, recording etc (especially with no GPU support) can cause lots of games to dip fps, and C2 games suffer horribly. Look up any YT video of Airscape and it's just terrible. I can barely even bear to watch recordings of Airscape anymore!

  • Aurel


    I was more asking about not the input lag, but the general feel of the game with out-of-sync or variable framerate ( aka framerate drops) under firefox (terrible under chrome, definitely).

    since if we can find at least one browser engine where the situation is not terribly wrong, that will give more weight to the argument itself!

  • Am I the only one who finds Firefox unusable due to random, severe lagging/janking? I'm not talking about a little here and there, I'm talking about terrible stop/starting and dt varience, even with relatively simple projects.

    I see the input lag in Canary. At first I wasn't, even with my 'torture test', a bullet hell shooter with > 2000 objects onscreen and a couple webGL shaders. No lag, 60fps, on my lowly HD4000.

    However...my project resolution is low. Like, 800x600. Scaled it up by 2x, and lo and behold, there is the input lag. Plus, janking and jerking...things look terrible even at 40-50fps.

    Tried in IE11. Surprisingly...it still looked pretty bad below 60fps. However, there was no input lag. Scaling the window down, everything is smooth again.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, all these issues definitely have one major thing in common: window size (or, more accurately, GPU fillrate).

  • sqiddster so you mean they are directly affected to the number of pixels to draw on screen for each frame, or to the total surface of the viewport?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)