tunepunk's Forum Posts

  • 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

  • Its not a 69 issue, I've been getting it more or less all the time. Here's screen from 68 on windows 10.

    I'm getting weird janks in FF as well. This is not a new issue. Sometimes more noticeable, sometimes not.

    FF also get's massive janks once in a while.

    And depending on the weather or what colour underpants Kim Kardashian is wearing at the moment, it might even look like this. Super janky.

  • Found this reported bug, which might be related?

    bugs.chromium.org/p/chromium/issues/detail

    This happens across browsers though, more or less.

  • With all due respect, It's nothing I'm imagining, and definately something I'm noticing everywhere and is recording when using devtools.

    Chrome, on desktop and on mobile. Windows and Android, IOS, MacOS,

    Firefox on desktop and mobile. (although firefox on mac less often) Windows and Android, IOS, MacOS

    I'm pretty sure GC works as it should on regular webpages, but For HTML5 games i've seen articles suggesting to use Static memory allocation and other techniques to reduce GC janks. Minor GC doesn't seem to cause any janks, but for some projects and in some cases i get quite a lot of Major GC janks. But for games i'm guessing you would want to eliminate janks and GC altogether.

    Just took this on chrome 69 on a powerful macbook pro. Those major GC janks often come in regular intervals. Sometimes more frequent, sometimes less. No browser extensions, no tabs other than Construct.

    I just don't know what to make of it...

  • I've put several projects on hold because of this, nowadays mostly using C3 for playing around with and prototyping, until a solution for the janks was in place.

    My first hope was the C3 runtime would fix it. - It didn't

    Second hope was that the Worker would fix it. - It didn't.

    I love Construct but I'm reluctant to finishing and spending more time on any real C3 projects if I can't even control or minimize the janks.

    What's the point of finishing publishing your games if you know that there will be a shitstorm of complaints and bad reviews because the users experience performance hiccups and janks.

    I've done all I can in terms of optimization. Besides from janks runs at constant 60fps even on mid range phones.

    This really needs to be adressed. :( I would love to finish them up in C3. but the janks are putting me off from spending any more time on it.

  • Here we go again... No, honestly the Original Poster (OP) has a good point... But still, here we go again.

    Anyway, yeah it's even worse on mobile. I personally experience the janks, but at the end of the day, it comes to.

    1. Can you prove it?
    2. Do you have time and resources to make a case?

    I'm thankful someone addressed this though. Because we really need proof and a test case right now.

    It's easy to prove. Just run devtools and record performance and check the for the hickups. Most times it's major GC causing it.

  • > Looking at the devtools memory profiler, C3 games looks like the above graph.

    >

    >

    >

    > Below: Static memory allocation for javascript. I don't know if static memory for C3 games might solve it, or even possible but the jank needs to go.

    >

    >

    FWIW, I just checked endless runner in Firefox, and it's just as bad. :(

    Yes, platform, browser, mobile, desktop doesn't matter. The janks are haunting me... :p

  • Looking at the devtools memory profiler, C3 games looks like the above graph.

    Below: Static memory allocation for javascript. I don't know if static memory for C3 games might solve it, or even possible but the jank needs to go.

    However for high-performance web applications, like HTML5 games, the GC can often eat away at critically needed frame rate, reducing the experience for the end user. With some careful instrumentation and adoption of object pools, you can reduce this burden on your frame rate, and reclaim that time for more awesome things.

  • I don't know if it's any help.

    But point 6 here, might have some tips and links on how to reduce the GC janks.

    calendar.perfplanet.com/2013/the-runtime-performance-checklist

    html5rocks.com/en/tutorials/speed/static-mem-pools

    They become very apparent when they do happen. especially in games with a lot of movement/scrolling

  • Ok, so I just upgraded to latest chrome stable. 69. My main problem with C2 has always been the jank, which mostly seems to be caused by GC (garbage collection)

    Usually I use the endless runner template as a benchmark, since the jank becomes very apparent in sidescrollers that should have a steady x movement.

    I always noticed some jank but latest C3 (r115) and latest chrome (69) the jank is just ridiculous.

    Starting a small simple game like endless runner produces so much jank it's not even fun to play.

    And I'm playing on a good spec, MacBook pro.

    MacBook Pro (15-inch, 2017)

    2.9 GHz Intel Core i7

    16 GB 2133 MHz LPDDR3

    Radeon Pro 560 4096 MB

    Intel HD Graphics 630 1536 MB

    What is going on here?

    Once in a while it runs smooth for a while, every other preview it seems like it's going in 15fps. Other runs i get major GC janks ever 8-10 seconds or so, and sometimes i get massive janks even without GC.

    I really wanna get to the bottom if this, because it's ruining the whole experience. Spending hours and days weeks to optimize your game to be lightweight and smooth, but getting janks that are out of your control, that shouldn't be there...

    Ashley

    Can we please delve deep into this and find out what's causing it and how to combat it?

    Running worker doesn't seem to help either, and my tests with worker only make it jank even worse.

    I'm pretty sure it's not my system, because I'm experiencing this on a variety of platforms and specs, OS, mobile, desktop, browsers whatnot.

    New edit & update

    Due to recent findings I'm updating here.

    This seems to happen mostly on laptop or windows devices that are on battery or running a balanced/power plan. Can possibly be caused by other things but this seems to be a major factor. It's explained here.

    vsynctester.com/manual.html

    Thanks for the find Asmodean !

    Specifically in segment 3 & 4

    There doesn't seem to be much one can do though, as this is out of anyones control, Scirra, Browser vendors. Only possible those responsible for power management could fix this.

    One idea to mitigate it somewhat is to tax the CPU so that it doesn't wind down clock speed on low cpu usage. I'm going to try it out and see if works, and update again and report my findings.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sizcoz Ahhh that's great. Makes my life a lot easier. Thanks a lot.

    I think I need read up on regex to figure out what those things do, so I can make use of it in the future.

    The good thing with events like previous examples with loops, are that they are a lot easier to read/customize and understand. Regex is nice and short, but looks like the cat just stepped on the keyboard. :D

  • henryWIJAYA

    Ahh nice. That looks a bit easier too read than my example. I'm gonna see if i can recreate something similar in to a function like my earlier example so it's easy to reuse in projects, and maybe do something similar for time. converting seconds to:

    hh:mm:ss:ms format

  • R0J0hound for some reason the regex does not work in c3, or maybe just firefox?

  • Made a solution with a function that is pretty flexible. It took a bit of time but this function i can just paste in any project, and feed it any number and it will spit out correct number format.

    Sharing if anyone finds it useful.

    dropbox.com/s/o1pcct9quz4mgsu/numberconvert2.c3p

  • I couldn't really find what i was looking for.

    I have some values stored in variables that should be shown in text objects. these are pretty high numbers.

    Examples of things i want to do:

    Format the values

    25700000 to ----> 25,700,000 and 25,7 million

    267300 ti 267,000 or 267 thousand.

    I'm quite amazed that Construct still doesn't have any built in support for handling and displaying values in a good way. Usually Requires very complex expressions to get it right.

    Anyone have any good example or formula for displaying integers with commas for every 3 digit?

    1,000 to 1,000,000,000 or higher?