We need to talk about the Jank!

0 favourites
From the Asset Store
High quality footstep sounds that're perfect, for adding realism to any project needing lifelike footstep audio.
  • Guys, try Canary

    at least for me it seems it back to as it was. i.e pretty much no jank (maybe 1 or 2 when first start but after minimal)

    69 is a jank nightmare though.

  • Guys, try Canary

    at least for me it seems it back to as it was. i.e pretty much no jank (maybe 1 or 2 when first start but after minimal)

    69 is a jank nightmare though.

    Just tried 71.0.3543.0

    No improvement for me.

    Just for the record

    device 1) Specs asus Laptop, with core i7 and geforce 745 - bad jank with endless runner

    device 2) Specs moto g6 android 8 -bad jank with endless runner

  • Here's a list of devices and browsers I'm experiencing jank on. Some little some more, but it's there. All running endless runner template.

    -

    15" Macbook Pro 2017. MacOS

    Chrome. Frequent recurring janks, a few seconds inbetween.

    Firefox. Less frequent, more sporatic but more noticeable, long janks.

    Browser extensions disabled does not seem to be making any difference.

    Safari not tested.

    -

    Surface Pro 4, i5 Win10 - 1803.

    Chrome. Frequent recurring janks, sometimes more sometimes a bit less.

    Firefox. Less frequent, more sporatic but more noticeable, long janks.

    Edge. Very rarely once every 20 seconds or so but usually coming in doubles.

    -

    Sony Xperia XZ1 (snapdragon 830) Oreo.

    Chrome. Occasional janks, more random, mostly less noticeable ones.

    -

    Iphone 8.

    Safari. Occasional janks, usually quite far between. less noticeable.

    -

    Huawei P20 Andoid 8.1.0

    Chrome - Very Noticeable, quite frequent 3-6 sec in between.

    -

    All are pretty good devices, all running latest stable OS and browsers. No beta, canary, nightly, or dodgy insider previews.

    Ashley If I have the issue on all my devices (less or more on each) I'm pretty sure you must be able to notice the jank on at least some of yours. Leave it running, or play the endless runner for a full 5 minutes or so. Don't just run it on your second screen for 10 secs while checking the inbox, and reading dev blogs. Sometimes the jank does'nt start right away, sometimes you notice a few directly after start, then they stop for a bit but come back half a minute later.

    I'm not saying it's caused by gc, but it sure seem related to it as dev tools record janks exactly when gc take place, even if the gc isn't long enough.

    This has been a major annoyance for a long time.

    I would rather choose a fix for this than awesome new C3 features. Doesn't matter how much faster the runtime is, or how many new features. Janky and laggy games are a huge turn off for any gamer.

    Hoping scirra and the community by reporting can make a combined effort to get rid of janks for good.

    <3 Love C3, but the janks are just frustrating.

    Here's a profile in json format, if it helps.

    1drv.ms/u/s!AkKozezb-5xyqMp1h8avo-EryZUjrw

  • I would rather choose a fix for this than awesome new C3 features.

    I must reiterate that our engine does not directly control things like v-sync scheduling, so there is probably nothing we can change in the engine to address it. You will get better results pursuing a good bug report with browser vendors.

  • I think everyone's jumped to conclusions on this. The profiles actually show that GC is not the cause. The profiles show a long frame, and only a tiny amount of time taken up by GC. For example the profile posted by TheRealDannyyy shows a frame taking 68ms, but GC only taking 8ms of that. Why didn't it schedule another frame in the remaining 60 ms? It looks like it could have done, because it wasn't busy doing GC, but it didn't. Right now we don't know why, but it is too early to blame GC, especially since it looks like GC finished quickly with plenty of time to spare. ...

    Ashley Why would GC do any work at all? I'm for incremental GC if necessary but in Chrome 69 those GC calls seem to be all over the place, regardless of available system memory, it's almost like GC is always under pressure to release memory.

    I couldn't find a more reliable example besides the one I posted before, could reproduce this on Win7; 8gb RAM; GTX 1050ti (4gb); Quad Core Cpu 3,6ghz. Taking a quick look at the open bugs for M69, looks like it's quite broken with several performance related problems.

    Again, I think best thing would be to wait and see if a hotfix will solve all the issues including this one.

  • OK so that is interesting.

    Im also running a surface pro 4 i5 8GB ram

    running c3 runtime/ preview in tab / im running dual screen also / with spotify playing on the other screen

    Just so you know Im not talking bull but

    Endless runner (on canary ) is totally flat for me. no jank over 30 seconds

    with 69 there is maybe (edit) 1 - 2 janks per second and they seem to be where nothing is happening just very long frames.

    what going on with the pic upload?

  • What I observed is, aside from the stutter where the GC is the culprit.

    I have frames that are 16 ms and frames that are 35 ms. In the frames that took 35 ms there are two AnimatonFrameFired. In the 16 ms there are always only one. If a frame took 35 ms it means that the framerate drops to 30 and there is a noticeable small stutter. I have no clue if this helps in any kind.

  • "But I was told that C2/C3 is nearly as fast as native, so maybe we just need something even fastesterest!"

    Sarcasm aside, this has always been a slight issue, it might be worse "again" now, but it was always there hiding under the Chromium runtime, and Google has made it pretty clear they don't care enough to fix it for game engines built on their platform.

    Overall I just find it really ironic that the reason we left the native realm was to avoid driver issues, and now we're facing issues that are basically the software/sandbox equivalent of drivers, and once again Scirra and by extension their customers / us are left throwing all our hands up saying "It's not our game/engine, it's the platform we're building on!"

    HTML5 will improve, it has already improved a tonne from when us CC users first tried C2 betas, but I don't think Google's going to save the day here. Scirra needs to invest some of that sweet C3 sub money into a proper runtime of their own for HTML5/JS that runs on all platforms. That's when they'll have the winning combination of killer editor and amazing runtime.

  • I created a bug report with Chrome here:

    https://bugs.chromium.org/p/chromium/issues/detail?id=881174

    It might be helpful if everyone posts there with names of devices that stutter. Maybe Ashley might have something to add.

  • I created a bug report with Chrome here:

    https://bugs.chromium.org/p/chromium/issues/detail?id=881174

    It might be helpful if everyone posts there with names of devices that stutter. Maybe Ashley might have something to add.

    Done

  • I created a bug report with Chrome here:

    https://bugs.chromium.org/p/chromium/issues/detail?id=881174

    It might be helpful if everyone posts there with names of devices that stutter. Maybe Ashley might have something to add.

    Cool. I'll post there too, but the jank in preview in chrome is one thing.

    If you're targeting online market like kongregate etc, where people might play on a variety of browsers and OS, should we file bugs with every browser vendor?

    If you usually export NW.js, do they have their own bug reporting? Do we get janks there?

    If you're targeting Mobile, Android, iOS we need to file bugs for those platforms/wrappers as well? I doubt filing a bug with only chrome solves anything at all, maybe for a few people, or at least we don't get stutters when we preview but those who play our games might get.

    How can we make sure that our exported games doesn't come with a stuttery experience? We simply have to rely on a heap of browser vendors and wrappers that may or may not think it's important enough to spend time on?

    My own projects run constant 60 fps on most platforms, but with the occasional jank. And one thing i noticed with the jank is not really the jank itself, is that if you get a jank exactly when you're klicking, tapping or any other input it may or may not register the input. I've played the endless runner template extensively for only testing the jank, and died due to failed input when a jank happens.

    I don't think it's as simple as filing bugs with browser vendors hoping they will fix it.

    I've tried demo games from other html5 engines as well, and they also have some degree of jank, some more, some less.

    The import thing is the final product. The export... is your game gonna be a janky experience for your customer, which may result in bad reviews, bad rating, fewer download, less profit, because of something we can't even control?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I created a bug report with Chrome here:

    https://bugs.chromium.org/p/chromium/issues/detail?id=881174

    It might be helpful if everyone posts there with names of devices that stutter. Maybe Ashley might have something to add.

    apk

    I tried your APK on my Sony Xpera XZ1, didn't notice any janks at all. Android version: 8.0.0

    Chrome version: 68.0.3440.91

    nw.js

    I also exported Endless runner for Mac with latest NW.js, and during a 2 minute play session i only noticed 2 barely noticeable janks. (macbook pro 2017)

    html5

    I also exported a html5 export and uploaded to my hosting service. tunepunk.com/endless Every other run, is extremely janky on the same machine, but most runs only a few minor janks. (macbook pro 2017)

    Same html5 export on Sony Xperia XZ1 android is a bit janky at times.

    -

    I can't draw any conclusions from this. But For exported project (apk, nw.js) for me runs better than html5 export, and preview, and not the other way around like you're describing in your bug report. Might be very dependent on browser version, browser brand, what os version, and the hardware itself? sometimes heavy janks, sometimes less, Don't know what to make of it.

    The only thing i can see and record is that in cases where there are janks, it somehow seems to be related to major GC in the debugger as they happen at the same time.

  • tunepunk personally i am not seeing the jank in canary, so I believe there were some issues in 69 which they have already addressed by the chrome team. What sort of jank are you getting in canary on the surface pro?

    Just to note Im not saying people are not getting jank and I am only looking at windows desktop performance on surface pro myself. (i definitely do see the odd jank when previewing, always a few times when first running, and if the surface pro is updating in the background or performing any other CPU intensive tasks) But Jank has really not been an issue for a long time for me and my current project is really pushing the surface pro to the max.

    However I do feel what you are saying, certainly last year there were some dark janking times and it is possble the jank is still lurking in the shadows. I’m sure I started a few threads myself. And sure janking really destroys any enthusiasm for game development on this platform.

    Also just to add that there are a couple of other things that need to be thrown into the mix if you are looking for influencing factors.

    1. Previewing from Construct 3 is always worse performance than when hosted or wrapped.
    2. I believe that operating systems are prioritising most tasks above whatever the browsers are wanting to do. This means jank and FPS drop anytime something else needs to be done. So moving a mouse on a maxed out system may give you jank. Combine this with sites like facebook which are continually scanning and mining your files eating up resources, or an obtrusive security application like Kaspersky then you have a sure recipe for performance issues. This is clear to me as when I make an exe/nwjs (which should be the same performance) the performance is very perceptively better than running in the browser. So once the operating sees an actual application running it appears to prioritise its execution.
    3. Modern tablets and laptops have very aggressive CPU management once they are unplugged. I see this on the surface pros. Even if I select all the maximum performance options for when unplugged it will never perform as good as when it is plugged in. There are features that are out of user control at work there.

    Anyway hope you sort. I am happy to do serious surface pro 4 comparisons/investigations if you think it might help as they should perform identically.

  • Ashley Why would GC do any work at all?

    It's the normal operation of a GC. As long as the program is allocating any memory at all, there are things to clean up.

    Overall I just find it really ironic that the reason we left the native realm was to avoid driver issues

    Can we not do the kneejerk blame-HTML5-for-everything again? No technology is perfect, and I'm super glad we don't have to deal with native driver issues, where the issues are far worse and you can't even file a bug because they have no public trackers. Having Google accepting bug reports and being willing to help is a huge advantage of the platform, and we should use it. It's just another bug, and like other bugs, it'll get fixed.

    I created a bug report with Chrome here:

    https://bugs.chromium.org/p/chromium/issues/detail?id=881174

    This bug report only mentions the Android webview, so Google will only investigate it for the Android webview. If anyone is experiencing jank issues on other platforms, another issue should be filed.

    I spent a while profiling the Endless Runner template on a Win10 x64 system with a GTX 1060 card and couldn't see anything out of the ordinary. A profile showed it did occasionally skip a single frame, but that could just be something in background scheduling in the OS or driver.

  • A profile showed it did occasionally skip a single frame, but that could just be something in background scheduling in the OS or driver.

    So that means i'm not going bonkers. They do happen, but seems to be no way to eliminate them completely, even if they are not caused by GC?

    Some games i've played, mostly older poorly optimized 3d games uses tripple buffering to even out the framerate a bit. Is that something that could help in these cases? and is it worth it for a bit more vram usage, depending on what type of game and platform you're targeting?

    From what I understand Tripple buffer is sometimes used to smooth the experience, similar to v-sync?

    Or these dropped out frames would not be helped by this kind of thing?

    Edit: Found this link and reading a bit. Just dropping link here in case there might be any useful things that can be done in WebGL to reduce jank on some platforms/browsers? Why knows, maybe there are some neat tricks online somewhere that might help.

    kripken.github.io/emscripten-site/docs/optimizing/Optimizing-WebGL.html

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