dt is not variable in chrome - cause of jank?

Discussion and feedback on Construct 2

Post » Fri Sep 15, 2017 11:20 pm

chrome doesn't have smoothly variable dt
which makes jank really obvious in chrome

if you make a simple program that plots dt against time (or add one into your game) , then stress the browser/cpu/gpu you will see that

chrome does only 16ms OR 33ms

nothing in between !

i think this is a major cause of people's performance complaints and jank / stuttering complaints

as soon as chrome cant handle 1/60, or something fires up outside the browser, even for a nanosecond, it drops a single 1/30
then you get a nasty jank (even if you are framerate independent it is noticeable as your game only has one 33ms frame as reference for dt)
the more stressed chrome gets the more single 1/30s it starts droping, the more janks you get.
also if you are running on old or weak hardware , for chrome then it is a constant tug between only two choices , 16ms or 33ms
and it will be dropping those sporadic 33s or 16s in singles
so even if you are framerate independent the jankyness will be really obvious on older hardware

but running in edge everything always feels much smoother
even if ultimate performance might not be as good as chrome
you dont get the big janks unless you really push it

i was wondering why this was and when I run the same plot program in edge I see that dt is constantly and smoothly variable

if something kicks in that might affect dt edge is smoothly manoeuvring dt ,
edge will even try to compensate by following high dt with a few dt less than 16ms if possible
and if you are pushing it , or on old or weak hardware edge will try to maintain a more regular, but higher, dt
making your framerate independent game a much smoother experience

im not a tech guy so I dont know how, when where dt is managed or calculated,
i thought it would be directly managed by the cpu but it seems the browsers can treat dt in different ways

@ashley

is this a thing or am i talking sh1te?
...
B
45
S
23
G
7
Posts: 291
Reputation: 8,020

Post » Sat Sep 16, 2017 8:34 am

Can you try this on edge?
http://www.vsynctester.com/
Chrome result: Occasional spike off the charts, some small spikes
Firefox: Some small spikes

Running these side by side: Chrome and Firefox do the small spikes in unison (interrupted by OS background processes?), but Chrome's off the charts spikes I cannot explain.

As for the 16/32/64ms thing, it's from VSYNC. If anyone has a above 60hz monitor, they could try to see if there's more draw windows and thus less janky switch when missing a draw? People have reported that a higher hz monitor increases the fps cap to the monitor refresh rate.
B
26
S
6
Posts: 57
Reputation: 1,472

Post » Sat Sep 16, 2017 9:04 am

@huZba
I tested as well..
In chrome i get some failures every now and then but overall smooth.
In edge I got a bit more. everything from 1 to a few fails per second.
In firefox it was pretty much constant fail. Broken.

Tested on a surface pro 4.
Follow my progress on Twitter
or in this thread Archer Devlog
B
40
S
17
G
17
Posts: 992
Reputation: 12,656

Post » Sat Sep 16, 2017 1:15 pm

http://www.vsynctester.com/chromeisbroken.html

Holy crap. The bug still not fixed ?
B
79
S
22
G
14
Posts: 389
Reputation: 12,324

Post » Mon Sep 18, 2017 10:01 am

Sorry I didn't mean to fire up the jank thing again.

jank is a million times better than it was last year as far as I can see to the point that it is almost a non issue. ( Based on my limited number of admittedly mostly modern devices).

Also on further research it seems maybe edge is not following proper protocol with its varying un vsynced dt. Where as chrome is.

I was just wondering if there was a something about the chrome 30ms spikes correlation with construct game engine jank that might highlight some chrome or construct issue that would banish jank forever.
...
B
45
S
23
G
7
Posts: 291
Reputation: 8,020

Post » Mon Sep 18, 2017 10:15 am

dt is measured with sub-millisecond accuracy. If it is locked on 16ms, it means the v-sync scheduling is so incredibly accurate, it's always exact. This means it's working perfectly! It's not a problem :)
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,681

Post » Mon Sep 18, 2017 10:33 am

Hi @Ashley. My game is framerate independent and yes in chrome for the most part I am seeing 16ms with impressive performance from the construct engine. but those sporadic 30ms spikes always go hand in hand with a jank.
...
B
45
S
23
G
7
Posts: 291
Reputation: 8,020

Post » Mon Sep 18, 2017 3:14 pm

I made a test for others to see if they get the same results as I do.
The skull spawns explosions each frame, you control the amount with +50 or -50.
When dt goes over 25ms, it spawns "JANKY"
Image
CC exe: https://www.dropbox.com/s/4ckkxbez7iou0 ... C.zip?dl=0
CC project: https://www.dropbox.com/s/ysfbukb3jnrpw ... l.cap?dl=0
C2 NW.JS export: https://www.dropbox.com/s/uv9tw0guvq0vs ... w.zip?dl=0
C2 project: https://www.dropbox.com/s/fos16fpcahcm4 ... .capx?dl=0

Results for me:
CC: at 600 /frame, no jank. Can stay jank free for minutes.
C2: at 200 /frame, jank every second on Chrome and NW export.
C2: at 50 /frame, Random jank every 5 seconds or so on Chrome and NW export.
B
26
S
6
Posts: 57
Reputation: 1,472

Post » Mon Sep 18, 2017 4:41 pm

huZba wrote:I made a test for others to see if they get the same results as I do.
The skull spawns explosions each frame, you control the amount with +50 or -50.
When dt goes over 25ms, it spawns "JANKY"
Image
CC exe: https://www.dropbox.com/s/4ckkxbez7iou0 ... C.zip?dl=0
CC project: https://www.dropbox.com/s/ysfbukb3jnrpw ... l.cap?dl=0
C2 NW.JS export: https://www.dropbox.com/s/uv9tw0guvq0vs ... w.zip?dl=0
C2 project: https://www.dropbox.com/s/fos16fpcahcm4 ... .capx?dl=0

Results for me:
CC: at 600 /frame, no jank. Can stay jank free for minutes.
C2: at 200 /frame, jank every second on Chrome and NW export.
C2: at 50 /frame, Random jank every 5 seconds or so on Chrome and NW export.


Can confirm on my GTX 1070 + i7 6700K:

Image

CC: at 950/frame, 28fps (running in background/not in focus), no jank
C2: at 600/frame, 33fps (running in foreground/in focus), jank
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
121
S
42
G
17
Posts: 2,219
Reputation: 19,800

Post » Mon Sep 18, 2017 5:05 pm

You're only comparing the Chromium engine - have you tried Edge and Firefox? They have different v-sync engines. Edge was particularly good IIRC.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,681

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests