Ashley's Recent Forum Activity

  • I don't think there ought to be built-in features for things which are already fairly easily possible. You can use sprites and avoid obvious stepping by using linear sampling mode.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing, please attach a .capx as required.

  • Not a known issue, but there is nothing we can do if you don't follow the bug report guidelines. I regularly work with projects for longer than 20 minutes and haven't seen any such issue. Please provide all the required details in the bug report template.

  • Oh, good point, it looks like that was an oversight. Will add for the next build!

  • Shaders are more expensive than simply setting a blend mode, so I don't think a special Mode7Additive effect is going to improve anything.

    If you've made all the improvements to the Mode7 effect I suggested (including separate shaders to remove the conditional), then I think it should be about as fast as normal rendering. The bottleneck is normally the number of texture lookups (normal rendering does one, but a blur might do ~10, requiring 10 times as many texture reads), conditionals (especially if unpredictable, which can make entire groups of cores stall if one mispredict occurs), or loops. Mode7 does one lookup, then some branchless math with no loops. I think in some cases the math is done "for free", because even if it weren't there the core would have spent the same amount of time stalling waiting for the next memory read to come through.

    The only thing to worry about IMO is the fact you have two more layers which will be using their own texture. After the layer renders it then has to copy the canvas-sized texture for that layer to the screen. It's the type of thing that on mobile will hit your fillrate hard and possibly cause poor performance. However if you're targeting desktops/consoles you probably have more fillrate than you could know what to do with (especially on high end desktop graphics cards, you will probably sooner run out of CPU power trying to issue rendering commands than run out of fillrate). So fillrate is probably not a major concern there either.

    So basically I wouldn't worry about it, it's a good way to get the effect working with different blend modes. Something you could do to help reduce the fillrate: if any of the layers are empty - or even if they have content, but it is offscreen - set them invisible. A visible but empty layer using an effect still takes fillrate (just to process a screen of transparent pixels); if it's invisible, it's entirely skipped, saving any rendering cost. So then you only pay the GPU cost when it's necessary, so e.g. if there are no FX under the ships then you don't spend any time at all processing shaders or using fillrate.

    I wonder if the engine could skip layers automatically if they are empty. I might try experimenting with that in the next beta.

  • Aurel - it's working correctly. What's happening is:

    1. Layer has effect so is rendering to its own texture

    2. Layer texture starts out transparent black (0,0,0,0)

    3. Additive blended object renders on top of transparent black. This (AFAIK) correctly fills in the alpha, so you end up with opaque black.

    4. Mode7 effect processes on the layer texture, which correctly distorts the black text.

    To fix it you can try setting the layer with the mode7 effect also to 'additive' blend. It will process the mode7 effect, then additively blend the result on to the background (since blend modes come last). This only works if everything on that layer has additive blend, but that's a good idea anyway since it improves rendering performance.

  • Will it be fixed? Who knows. "It's out of my hands. Stop blowing up my inbox" says Ashley, lead developer of C2.

    Uhh, how about "it's already fixed in Chrome Canary and Mozilla are working on it too"?

  • OK, well, if you're creating/destroying 100 objects per tick then the CPU overhead of the create/destroy actions comes in to play. These need to do things like update object instance lists, families, containers, initialise the default state, initialise behaviors and so on. Most people don't create hundreds of objects per tick so it's not a significant overhead, but in this case it is measurable. I still don't think it's anything to do with garbage collection. The engine still recycles objects when it creates them, but creating an object just involves more work than re-positioning it. So in this specific kind of use case (you're basically recreating particle effects with sprites) repositioning is cheaper, but this does not prove garbage collection has any involvement at all.

  • Do you have triggers to handle all errors as well and display them if any occur? Otherwise how do you know if anything is going wrong?

  • The events in your screenshots make no sense. When the hi-scores are received, you just request the hi-scores again, so it will loop around and around constantly making more requests. Google Play might even have temporarily banned you for making too many requests.

  • Absolutely not worth the engineering effort. Non-browser engines like Ejecta are a compatibility nightmare, and a bit over a month since release iOS 8 is already over 50% install base. iOS 8 would probably have a vast-majority install base by the time we could get something like this working reasonably, making the whole project pointless. Also once Cordova updates to WKWebView its performance will far exceed that of Ejecta due to JIT.

  • I would probably not blame GC for any of the issues here. The engine is pretty good at recycling stuff. I mean it even recycles entire object instances. So even if you are constantly creating and destroying objects, it's actually internally recycling previously destroyed instances instead of allocating new ones. So you don't need to reproduce that in events. The rest of the engine has a similar approach of "recycle it all", so regardless of the content of your events, allocations and garbage creation should be minimal. Perhaps it is something else. Real demos with objective measurements are the best way to investigate it.

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 27 Oct, 2026

Twitter
Ashley has 1,835,152 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
  • x6
    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
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs