Let's talk about the horrendous input lag in Chrome

Discussion and feedback on Construct 2

Post » Mon Dec 22, 2014 8:29 am

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? ;)

Cheers!
You do not have the required permissions to view the files attached to this post.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Mon Dec 22, 2014 9:57 am

It seems that Chrome and Node-Webkit should be deprecated :)
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Mon Dec 22, 2014 12:48 pm

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.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Mon Dec 22, 2014 2:07 pm

@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.
B
77
S
28
G
32
Posts: 481
Reputation: 19,763

Post » Mon Dec 22, 2014 2:26 pm

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.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Mon Dec 22, 2014 2:47 pm

@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 : )
Image | @AurelRegard on twitter
B
19
S
6
G
1
Posts: 307
Reputation: 2,500

Post » Mon Dec 22, 2014 11:18 pm

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.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Tue Dec 23, 2014 12:04 am

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 : /
Last edited by Aurel on Tue Dec 23, 2014 12:13 am, edited 1 time in total.
Image | @AurelRegard on twitter
B
19
S
6
G
1
Posts: 307
Reputation: 2,500

Post » Tue Dec 23, 2014 12:09 am

@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..
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Dec 23, 2014 12:27 am

@Aphrodite No input lag in Firefox indeed.
Image | @AurelRegard on twitter
B
19
S
6
G
1
Posts: 307
Reputation: 2,500

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 24 guests