Ashley's Recent Forum Activity

  • It also depends a lot on quality settings. Even if you have a 2mb JPEG (PNG is really not suitable for photography), it could just be that it was saved with very high quality, and the video is very low quality (HD refers to the resolution, not the encoding quality). So really you can get any numbers you want by adjusting quality levels.

  • When did I write that? :S I think it would have been a few years ago at least. I'm not sure it's still relevant - those tools now help ensure you have the latest driver installed, which is definitely a good thing...

  • I thought they required collision checks to happen before any instance filtering occurred in the event sheet? Most of the times I need to check collisions it's after filtering has occurred.

    Oh right, yes, that was a limitation. But then in theory your filtering has already reduced the list of candidates that need to be tested for collisions. Or are you picking large numbers of instances first? That could effectively disable the optimisation, but if it's really bad it should be possible to rearrange events to do the collision-cell enabled check first.

  • Are you sure you're calculating the bias correctly? Maybe it's thrown off by spritesheeting? I am pretty sure the mipmaps are all there.

  • As long as "downscaling quality" is not "low", Construct 2 creates mipmaps and enables tri-linear filtering (linear sampling between the nearest 2 mipmaps, linear-sampled). The "point" and "linear" project settings in this mode correspond to whether the mipmaps are linear or point sampled. So if you're accessing a mipmap from the shader... it should be there already?

  • - You said it brings improvements to memory management - does that mean we as users would get more control of loading and unloading things like textures from memory?

    Mainly I was comparing it to a major limitation of asm.js, where by default you get a fixed amount of memory, and that's it. This is a pretty major shortcoming for a game engine since nobody can easily tell how much memory they'll need in advance, or if it might still exceed that in rare cases. Also you can't just set it really high, because it always uses that much memory, even if it is only using less. I think you can enable memory growing in asm.js, but last I looked it had a bunch of caveats and reduced performance. AFAIK WebAssembly aims to solve this problem properly, where memory can automatically grow (and possibly shrink) to match the requirement and not impact performance.

    Anything that can be done with textures can already be done with WebGL, it's not really related.

    [quote:2yrvin8h] - When you talked about the possibility of rewriting the event system in it, how far would that extend? Would that cover behaviors as well? Would people be able to make third-party extensions using it as long as they had the tools?

    I don't know really, this whole project is still just an idea. I would lean towards no, all plugins and behaviors would be written in normal JS, because it's so much easier (JS is easier than languages like C++ and the development process is far simpler without needing ahead-of-time compilation, especially if you get in to debugging). However there is still uncertainty about what the WebAssembly <-> JS transition performance overhead is, which could kill that. Individual plugins and behaviors could still use asm.js/WebAssembly if it benefits them, like Physics already does. Another open question about WebAssembly is if it can elegantly handle multiple WebAssembly programs in the same page.

    [quote:2yrvin8h]- In particular I'm interested in collisions - I have a lot of scenarios where using collision cells is either difficult, unfeasible or complicates my code, so any speedup there would be helpful.

    Collision cells are an automatic internal engine feature and it doesn't need you to do anything different, so what exactly is difficult/infeasible/complicated about that?

    [quote:2yrvin8h] - Rendering - I acknowledge my ignorance on the subject, but since webGL is written in javascript, it seems plausible that it could help with the performance impact of the draw calls or other such elements of preparing the scene for rendering, even if it wouldn't speed up rendering itself?

    Yes, it could speed up draw calls, but I don't think it's worth it - usually draw calls are not a bottleneck, in cases they are there are still ways we can optimise it in normal JS, and draw calls are issued by plugins which are typically written in normal JS.

    [quote:2yrvin8h]- Physics - because webAssembly needs to be compiled to from another language like C similarly to asm.js, would it be a comparatively simple task to compile the physics for webAssembly to get the 20-30% speed boost (if, of course, it's really that much faster)?

    Right now nothing involving asm.js/WebAssembly seems straightforward, because they are not really mature technologies yet so it's easy to run in to roadblocks. So probably not. But I doubt there would be a huge improvement anyway, asm.js is pretty good as it is.

    In short, this is still just an idea, there are a lot of details and uncertainties to be figured out, particularly around third-party plugins.

  • All WebGL shaders run every time the image is drawn, usually every frame.

  • Answer your own performance questions with measurements

    although I will add:

    • there's no official behavior that can change the color of an object, I guess you're looking at a third-party addon?
    • if you have a lot of objects and many overlap, applying the effect to the whole layer can be faster, since it only processes everything once. Otherwise overlapping areas are processed more than once. On the other hand if you only have one or two small objects, it would be a waste to apply the effect to the whole layer, since it will have to process a larger area than necessary.
  • Option 1 sounds like what we describe in remember not to waste your memory, so go for that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create another sprite on top with a Square collision box pin it to the object

    This is our officially recommended workaround to needing multiple collision polygons, and uses the existing collision engine which is well-optimised, so I think you may as well do that.

    [quote:2jq29n0f]For me et least on developing for mobile Zordering is one of my main resource hogs at the moment, so I would like to bring it down further to allow for other good stuff instead.

    Have you tried the new "Sort Z order" action in the latest beta? That should be significantly faster than previous approaches.

  • What's wrong with the built-in collision system? It does that kind of check internally, but even faster, because it uses collision cells.

    • Post link icon

    I've answered it so many times I am just super tired of typing it out over and over again. I think I need to write up a definitive blog post on our position on this.

    For example, we see a lot of "mobile performance sucks in C2", and then it turns out their game hammers the GPU fillrate, so it would not be faster in a native engine!

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,779,024 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs