I need your help to figure out Airscape's performance issues

  • ^

  • (Sorry, forgot to do responses)

    Aurel, nothing offscreen is rendered. This problem is purely rendering related. Thus, offscreen activity shouldn't be a factor.

    As for regular rotation, yes, the janks are just as noticeable, possibly even more noticeable.

    yep. I'm definitely really weirded out by all this...

  • I still get random stutters for a fraction of a second here and there.

    I got it when I was on a very beefy Radeon R290 and still get it now on a Radeon 7950.

    It feels like the stutter is a) texture dumping & loading, maybe gc related b) logic bottleneck or c) memory leak? I say this because in games where these are in fact the causes, I get random stutters too.

  • The latest results are baffling - HTML5 is such a crapshoot... I genuinely feel for you Daniel, Im sorry

  • I'm not sure if this is a useful comparison because v1 of the demo allowed me to zoom around and force lots of graphics work of my gpu, whereas v2 of the demo doesn't move around (so should be 60 fps, right?). I took these screen shots of chrome developer tools showing the javascript work being done per frame and, where there are gaps, the dropped frames. Version 1 dropped something like 1/5 and version 2 dropped something like 1/10. It would be interesting to make a comparison with a version made with r198 that allows for zooming around. If there's no difference between v3 and v1 then the problem is more likely to be of chrome's making. Such a comparison might show a difference in dropped frame rates - and if there is a discernible difference in dropped frame rates under similar loads then that would indicate that some of the problem could be down to the c2 engine. I have just reached the limit of my understanding...

    [attachment=1:264w5cbi][/attachment:264w5cbi]

    [attachment=0:264w5cbi][/attachment:264w5cbi]

  • Colludium if you can't move around, that's a bug. What's preventing you from moving?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Weird - I had only bubbles where squiddy should be.... It took a couple of hard refreshes and clicks on the link to get it to work properly. For comparison then, here's a screen shot of the v2 running - no difference to v1 as far as I could see.

    [attachment=0:1ey8zjsa][/attachment:1ey8zjsa]

  • Out of curiosity, I just did a bit of testing in a different level of the full game.

    I disabled all the layer shaders (There's still an adjust HSL shader on the player, but the effect of that has to be minimal)

    I'm not even talking jank at the moment, just raw fps.

    At 1080p in Chrome, with webGL ON, I got around 40fps.

    At 1080p in Chrome, with webGL OFF, I got 60fps.

    I'll say it again

    At 1080p in Chrome, with webGL ON, I got around 40fps.

    At 1080p in Chrome, with webGL OFF, I got 60fps.

    This is actually sort of exciting for me because it means that there's definitely something wacky going on somewhere. Ashley any ideas?

    EDIT: I did some further testing in my fillrate tester (The same one used in this topic) and found that webGL performance was basically exactly the same as non webGL. I've tried to do some research to find out if this is expected behaviour or not, but there doesn't seem to be a lot written on the subject. Apparently fillrate usually isn't an issue for most games?

    EDIT 2: OK, maybe I'm going crazy. I looked up some benchmarks:

    Renderperf3: WebGL disabled

    Renderperf3: WebGL enabled

    I went around to every computer in the house and tested them out, on Chrome and IE. There were four laptops with Intel Integrated Graphics of different varieties, and every single one had non-webGL either perform identically to webGL, or surpass it by a significant margin. The only exception was a five year old mac, which crushed all the other computers when it came to webGL performance, and was about the same with non-webGL performance.

    So... what's going on here? Why am I the only one who's noticed that webGL is performing the same as canvas2D on all Intel Integrated Graphics machines? Or is there something I'm missing?

  • sqiddster

    I would be wary of those benchmarks...while I see the same as you (and I have Intel graphics, HD4000), I'm wondering about that text object that is being modulated...it looks like it might not be a spritefont. Also, I'm not seeing the same when trying some similar tests. Give these a go:

    https://www.dropbox.com/s/8blp1b2nrnnvt ... .capx?dl=0

    https://www.dropbox.com/s/b0qkyjxzd55k1 ... .capx?dl=0

  • Interesting, I get very smooth performance on my 6 year old laptop with max settings (I guess - normal rendering and the highest resolution available). It moves from 40 to 60 fps, but feels very smooth throughout. Both windowed and full-screen.

    My system is a:

    Intel Core 2 Duo CPU - P8400 2.26Ghz

    4 Gb of RAM

    GeForce 9800M GTS

    Windows 8.1 Pro

    1920x1080 system resolution.

    In full-screen it feels very proper-gamey, especially with all the menus, etc. I do notice the fonts loading in - perhaps consider sprite fonts for those?

  • TiAm it's not a spritefont... but text should have a very minimal performance impact. We're not talking mobiles here.

    In your benchmarks:

    PixelFillrate: Canvas2D gives a slight performance bonus over webGL, in both IE and Chrome.

    DevilMark: webGL allows about twice as many sprites as Canvas2D in Chrome, and a little bit more in IE. Interestingly enough, the amount of devils I could spawn before it dropped to 30fps was about *five times* the number of sprites I can support in the renderperftest.

    So... still no friggin clue what's going on. You said you see similar results with the renderperf test?

    Somebody thanks for the kind words. As for the fonts loading in, in NW I've never noticed any loading. It's not really designed for browsers.

  • sqiddster

    I think I have a hunch about what is going on here. But first, my test results:

    I see similar results in renderperf: 2.5x as many sprites in canvas2d as in webgl. In the other two tests, I get:

    PixelFillrate: slightly more sprites onscreen with webgl, about a 25% increase. However, with canvas2d, my cpu gets maxed, whereas webgl only uses about 6%.

    DevilMark: Here WebGL pulls way ahead of Canvas2d because the CPU is also having to handle quite a bit of logic moving all the devils around and testing their collisions. About a 3-4X difference.

    Okay, here's what I think is happening: Canvas2D is pulling ahead of WebGL because, in systems with integrated graphics, the performance discrepency between the CPU (top-of-the-line) and the GPU (bottom-of-the-barrel) is so great that software based rendering wins out in situations where there is little or no logic overhead. This is why canvas2d falls behind on a test like DevilMark.

    What are the actual specs of the systems you are testing on?

  • TiAm Your results pretty much match mine. 2.5x for canvas2D is crazy though, I didn't see anything that high.

    As for your theory:

    It's a great theory and you're probably right, but it strikes me as a little weird. I find it hard to believe that an integrated graphics chipset would perform as well, or slightly worse, than software rendering on the CPU itself. It just doesn't make any sense. Maybe I'm being weird, I dunno. Anyway, from my limited understanding, can't canvas2D be hardware acellerated as well, just more slowly?

    As for specs:

    Machine 1:

    Intel Core i7-4710HQ

    Intel HD graphics 4600

    nvidia GTX 860M (Disabled for testing purposes)

    12gb RAM

    Machine 2:

    Intel Core i7-4510U

    Intel HD graphics 4400

    8gb RAM

    The other machines are pretty similar, but lower spec'd. Can't access them to get specifics right at the moment.

    EDIT: I just asked someone who programs games in pure C++, he said that software rendering should never ever be faster than hardware. I tend to agree, especially when we're talking javascript here.

  • canvas2d IS hardware accelerated too, or at least it does not mean software rendered, in fact, on chrome (I think C2 has things to prevent that) software rendered enables a simulated WebGL (since it is software rendered, there is no limitations feature wise, however it will be slow as hell), and believe me, I have actually a netbook with software rendering by defaut on the chrome browser, and you will not go over 10 fps on it, even with very few elements being displayed.

    the fact canvas2d outweight webgl can come from various factors:

    -on weak systems (older iphone before iOS8, aka before a just in time compilation of javascript), the webGL javascript overhead can be really painful, that is partially why nobody enabled it on iphones exports in the past

    -effects, but since there are ways to disable them no game should be blocked by that.

    -perhaps a webgl implementation of the browser that is woncky?

    -updating text objects too many times and updating them, they are not performing well on webGL, not sure of the reason.

    -using r0j0h0und canvas plugin, it does not render directly in the webgl renderer.

    I might forget some (or just don't know them), but the point is canvas2d is another renderer, that is still hardware accelerated.

  • Aphrodite thanks for the clarification. Now that you mention it, I do remember hearing somewhere that canvas2D can be hardware acellerated. For further clarification, if canvas2D is also hardware accelerated, why is it (supposed to be) so much slower than webGL? Is webGL just 'more low-level' somehow?

    Anyway, none of your factors even remotely explain what's going on, except perhaps 'wonky browser implementation'

    -weak systems? No, this is a top-of-the line CPU and integrated graphics setup.

    -effects? None in this benchmark, or my game once I've disabled them.

    -wonky browser implementation? Maybe, but that doesn't explain why only some systems are effected. Also, doesn't explain why *all* browsers on these systems are effected!

    -text objects? Maybe on mobile this is an issue but I think it's safe to say that for the purposes of this benchmark, text will have a tiny tiny tiny effect, if any.

    -canvas plugin? Not used.

    Everyone: To put things in perspective: I tested the renderperftest on my 2-year-old android tablet, and with webGL enabled it outperforms all pc's tested by a factor of 3.

    Also, just tested in Firefox. canvas2D outperforms webGL by a factor of 2.

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