Ashley's Forum Posts

  • The project uses the following third-party addons:

    Audio helper

    Layout transition V2

    LiteTween

    Also given the size of the .capx it looks unlikely to be a minimal repro as per the bug report requirements. Closing, please file again following the guidelines if you still want us to investigate.

  • HessamoddinS - I'd rather not add languages before we know when we'll be able to use them, since it might upset contributors. For example if someone spends 2 weeks doing a complete translation, then we don't use it for 6+ months, I'd understand if they were angry and felt like their time was wasted!

  • Your screenshots don't match the effect or .capx provided. Based on what you have provided, it's not a bug. vTex is the position in texture co-ordinates of the current fragment on the source surface. By design, this can be pretty much anywhere. With spritesheeting, this means the sprite image is no longer 1:1 with the source texture, and will instead be a subset of the texture. Also it changes in some other circumstances, such as you've found when you change opacity: in this case the effect compositor pre-renders the sprite to a viewport-sized surface with the opacity applied, and then processes the effect from a sprite-sized subset of the viewport-sized surface. This is necessary to ensure the shader processes pixels with the opacity already applied. This pre-draw step changes the co-ordinates of vTex. Normally this doesn't matter - if you use texture2D(samplerFront, vTex), you always get the right pixel. The shader you provided simply displays vTex as a gradient and you've pointed out the cases where it varies; these cases are by design, so this in itself won't be fixed.

    What you probably need instead are uniforms that specify the source rectangle subset being processed. Then you can use vTex's position within this rectangle to determine the normalised texture co-ordinates ([0-1] range) within the subset actually being drawn, rather than relative to the entire source surface. Construct 3 provides the necessary uniforms with the srcStart/srcEnd uniforms, and even provides an unclamped srcOriginStart/srcOriginEnd rectangle as well to avoid effects changing as they clip against the viewport edge. Then in a C3 shader you can use a calculation like this:

    mediump vec2 tex = (vTex - srcStart) / (srcEnd - srcStart);[/code:1j3hmbyw]
    which calculates 'tex' as normalised co-ordinates within the rectangle being drawn. Using the srcOrigin variants gives you normalised co-ordinates which don't change as it clips against the viewport, which is usually more useful for anything other than sampling the background. E.g. if your shader drew a circle from vTex normalised to srcStart/srcEnd, it would squish up as it moves off the viewport, but using the srcOrigin variants ensures it looks consistent. (The manual covers this, and some other useful patterns, in the manual entry I linked to previously.)
    
    Unfortunately, C2 doesn't provide the necessary uniforms. We did a ton of work on the effect compositor for C3, and it took a great deal of time and effort, it's some of the most complicated code I've ever written. C2 has around 80 built-in effects and we managed to get by without these uniforms. At this stage it's unlikely we could add these uniforms back in to C2, it's incredibly complicated and time consuming, and we did it along the way while upgrading the codebase for C3. These uniforms are essentially a new feature of the effects engine in C3 allowing for more consistent and better quality effects. Still it should mean you can write these effects and have them work as you need them to in C3.
  • Well, that basically proves its an Intel graphics driver bug. You can try reporting it to Intel, but good luck with that, I've struggled to get any graphics vendors to pay attention in the past...

    I'm afraid we can't do anything about driver bugs ourselves, so closing.

  • Can't reproduce here, it's working fine, and I've not seen any other reports of this. Maybe try updating your graphics drivers, driver bugs often cause issues in C2.

  • The .capx link is invalid. Please provide a working link otherwise we can't investigate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've no idea. The best way to get help is to share a project. Removing third-party plugins is helpful too. And perhaps try waiting longer than 50 minutes for a reply

  • Well, as I said we plan to introduce a whole new feature anyway, so yes we will improve it and it should become a moot point in future.

    Fork-and-modify inherently causes compatibility problems, so if possible we should try to think of a way to extend existing addons from a different addon. Perhaps there could be a way to tag ACEs to appear on a different plugin instead, which receives the instance to operate on as an extra parameter, or something like that.

  • Are you using PhoneGap Build? If you have an issue with that, it might be better to contact them about it.

    We also have an official guide on using the Cordova CLI here and you can also use C3 to build C2 exports.

  • Well, this puts us in an awkward spot. Nobody was ever meant to use this feature. I'm also generally not a fan of the fork-official-plugin-and-tweak approach to plugin development, as it's a perpetual source of compatibility problems, as it has unsurprisingly become here. We could add fast triggers to the C3 SDK, but then there's nothing stopping new plugins being released using it, meaning the compatibility risks I described earlier get carried on in to C3 as well. This is frustrating since a new product is a good opportunity to make a clean break and remove old compatibility cruft from the code base, but this will bring in some awkward compatibility stuff right at the beginning of the product lifecycle.

    We do intend to redesign the function feature after the new C3 runtime which will supersede the official function plugin and any other third-party function plugins as well. Hopefully this will then make the issue irrelevant, since everyone will migrate away from all function plugins to the new feature. Because of this, I think the best compromise is to port the plugin to C3 using standard triggers rather than fast triggers. It may not be as fast as in C2, but it shouldn't be terrible, and it will only be a problem in the period between now and the new function feature in the C3 runtime.

  • Ashley - I haven't looked too deeply at the pixi library but I reckon you're right.

    It would be good to have a more modular approach to sprite / drawn objects in c2 / c3 (in the new runtime?). I mean, if you're just using sprites for background imagery, for example, then there's no need for the runtime to keep arrays of data on unused components like collision polygons etc. It would be amazing if that horse hasn't left already and this sort of approach could be included in the future (like many more behavior options to add to a basic particle-like sprite). Just a thought and a hope...

    In general I doubt it's worth it. Adding different rendering modes adds a lot of extra complexity and that often causes bugs (e.g. render path A is not pixel-perfect identical to rendering path B). Also as I mentioned in the original thread, in these tests we're really talking about tiny differences on the scale of nanoseconds per sprite, that scale up to bigger results in specific benchmark tests. I rarely see real-world games bottlenecked on this as well, so it looks like a lot of complexity for no real-world benefit other than improving a specific benchmark result. This is one of the limitations of benchmarks: it tempts you in to running down a performance rabbit-hole which just ends up wasting time.

  • Zebbi - IIRC the device had a buggy GPU and was blacklisted for GPU acceleration. It only affects a few percent of devices in the world these days. It's just bad luck you had one of them really. It's nothing to do with event performance.

    Colludium - IIRC Pixi was using point sprites (same as Particles plugin in Construct) so it wasn't exactly an apples-for-apples comparison. Point sprites can't scale or rotate so aren't really useful for the Sprite plugin.

  • Why not just use "On touched" instead?

  • The message about throttling suggests you're spamming the API with constant requests and it's decided to stop you to prevent overloading the servers. I'd guess you've accidentally made an event that tries to load the leaderboard every tick, or something like that.