tunepunk's Forum Posts

  • Here's a link to the test scene. Just moves sprites across the scene.

    https://www.dropbox.com/s/gd1tk3p9c75op ... t.c3p?dl=1

    Just leave it running and occasional janks will appear randomly every now and then. I always thought it was something with my events and something I could optimize later on when game was getting closer to finished state.

    Ashley is this something that might improve with the new runtime as well? Or are we at the mercy of browser engines here?

  • I did a simple test scene that just spawns randomly spawns a few sprites that move across the screen. No behaviours, no text objects, or anything.

    Still getting janks every now and then. I guess there's nothing more I can do at this point...

    It's not a game breaker but a bit annoying and quite noticeable at times.

  • Reading a bit about garbage collection to understand it better... From what I've read some ways to reduce jank was to do it on other threads, or schedule GC in idle time.

    Is there something that can be done on your end or is this purely browser related?

    For me it's not that big of an issue, but I would prefer silky smooth if possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley yes this happens in chrome as well. I just tested the endless runner example in chrome, on a fairly good iMac. I just left it running and every now and then I get a pretty heavy jank.

    3.4 GHz Intel Core i5

    24 GB 1600 MHz DDR3

    NVIDIA GeForce GTX 775M 2048 MB

    So that's why i found it odd. It seemed to happen across several devices and browsers, so no idea what it could be. A very lightweight game like that shouldn't have any janks on that powerful machine.

    Using the debugger in Chrome and recording performance, I get Major GC, and DOM GC on the spikes, so i guess it's some garbage collection?

  • Finding rational descriptions of activities is difficult. There are many tutorials that say how to do something, but not how something works.

    I think this was one of my main issues when starting out as well. Revisiting my old project after a year or so after I learnt a lot of things experimenting with some other small projects then looking at my code thinking..." Why the hell did I do like that " ..

    There's a lot of ways to do things. Many things work, but some ways are not very efficient or very nice looking, and overly complex. :p

    I think some best practices tutorial would be good, so you don't use common mistakes, explaining why you do it in a certain way.

  • NetOne It's nothing major.

    Not as much, but it happens. I just thought I would highlight it, in case it was some kind of bug, or something that could be improved. No big deal really.

  • Ashley

    I'm getting the jank on any project any machine.(More noticeable and frequent on slower machines) Even the endless runner template running on my powerful iMac at work. So I'm wondering what it could be.

    Here's a screenshot of endless runner with similar jank on the iMac.. They happen occasionally, and seems to be WebGL related.

    Reproduction Steps.

    1. Run Endless runner template.

    2. Just keep it running for a while.

    3. Every now and then you will notice a small jank.

    4. Try again and record what's happening with dev tools.

    So I'm wondering if this is an artifact of WebGL? It's not that big of an issue, but just a bit annoying, since games run really well otherwize. Pretty much constant 60fps.

    Nothing worth crying about but just wanted to highlight it, if it's something caused by the runtime.

  • ASHLEY.

    Fixing the preload fixed most of the jank, but I'm still getting some janks from time to time. This time not from create object. It's from this.

    You know what to make of this? Render cells? Force own texture? or something else? Or just an artifact of preview? It doesn't happen all the time, but it's quite noticeable when it does with recurring hickups during the span of a couple of seconds. I'm trying to mitigate it as much as possible. Since I'm doing a fast paced online multiplayer you don't really want janks in life and death situations :p

    Any help appreciated.

  • Ashely It seemed to help a bit actually. Removed all the objects form the hidden layout.

    I'm curious though if this is the case for Global Layers as well? Can you use a hidden global layer to automatically preload common objects that are used across multiple layouts? Will they preload correctly, or do you have to manually place the objects that needs to preload in their respective layout?

  • Ashely Thanks for the reply.

    Usually you get a warning if the object is not in layout right?

    I do have a layout called "hidden" where I place some objects that is used across several layouts. I use that hidden layout so I wouldn't get the warning about no instances. Could it be that hidden layout causing it?

    I never play on this hidden layout, it just holds object that are not available or layoutstart for the map.

  • Even setting the animation in a trigger produces the jank. The odd thing is that it starts after a little while.

    Just moving around the character. A few seconds it's perfect no janks. Then after a little bit A massive jank and then regular janks ever 1.5 seconds or so.

    It really bothers me as the game otherwize runs very smootly, even on lower end phones but the janks, I can't find a reason for.

    With set animation as trigger instead.

    Ashley Any insigt on this?

  • NetOne turning off animations completely seems to work. I was able to narrow it down to being the action set animation play from beginning that was doing it. BUT the problem is why. I can not, not use that action.

    Maybe I'm using it incorrectly? Does it have to be used in a trigger?

    Anyway it seems like every time the animation starts over or loops the jank appears.

  • Ashley

    It's been boggling my mind a bit why i was getting janks on almost every device and browser and used the firefox dev tools to see if I could find any reason. Every other second i get a massive fps drop from about constant 60fps to 4-8fps.

    I don't really know what to make of this but there is something causing massive jank and I doub't it's V-sync related. It seems to happen very regularly, pretty much every time the 15 frame walk animation repeats, or when other animations run.

    Here are links to a few more screenshots:

    https://www.dropbox.com/s/zaos0s7mwu3as ... 3.JPG?dl=0

    https://www.dropbox.com/s/zrnqn94mbamlm ... 5.JPG?dl=0

    Do you have any idea what can be causing this and how to reduce it? It happens on almost every device i test on (that is not super powerful)

    It seems to be related to animations and animationframes. Maybe a bug that should be reported?

  • NetOne Did you get fall creators update? Lot of people complaining about edge after fall creators update. So i doubt it's a C3 issue.

    I'm using SP i5 8g 256 but has not upgraded to FCU yet so if you want i can try performance test to see if i have the same jank in edge.

    I have not not noticed any significant jank when previewing my exported projects in edge.

  • dop2000 updated the file for you. Setting a random xy instead.

    https://www.dropbox.com/s/90j1nht9ntmu2 ... e.c3p?dl=0