R0J0hound's Forum Posts

  • Right now the way it's done is to load it into a sprite and then pasting it back into the canvas.

  • cantek

    That would be a very useful feature to have. Right now I end up analyzing by visually walking over my events and imagining the results of each one. Its not ideal and I often have to do some tests in a separate capx to see what a particular condition or actions does before I can analyze it in my events. It would be much easier to see what's going on if the debugger allowed you to step through events and see what's picked at each step. It would be and invaluable tool IMO especially for beginners as it would show you exactly what's happening.

    It's the main feature that's lacking from the debugger that would make it like a debugger for standard programming languages.

  • tulamide

    That memory leak comes from the texture not being freed when the canvas is destroyed. It only occurs on xp with webgl on and I can't fix it... but I'm not sure why.

    In other news I had a go at making a proper webgl fix and ran into too many issues to get it to work. C2's runtime isn't designed for it and I lack the technical knowledge, ability and time to get something working. So for the foreseeable future my recommendation is to use the plugin with webgl off for the best speed.

    Alpro

    I suppose it's doable but it doesn't really fit in with the canvas' purpose. Pasting a canvas with the spritesheet to a smaller one is a cleaner solution imo.

    Paradox

    I'm not offended at all. That's one nice looking icon. I'll include it in my next update. Thanks.

  • A way to do it would be to convert the bezier curve to a polyline. The more points you use the better the approximation of the curve you will get.

  • tulamide

    Hmm... The memory usage stays stable for me on my vista computer. I'll have to try it out on the xp one and get back to you.

  • Ok, a quick update. Updated download on first post.

    *Fixed the issue with the minifier.

    *A optimization was added for webgl. A texture won't be created every frame if nothing has changed on the canvas. Now only after stuff was drawn to the canvas will it update. This will make it faster for projects that draw occasionally or just once. If stuff is to be drawn every frame then there will be no benefit.

  • Sigmag

    1) The minifying bug isn't the cause of the performance hit. The hit is from using canvas2d internally and copying it to a webgl texture every frame. A proper fix would be to only use webgl when it's enabled.

    2) I test on a 10+ year old laptop with winxp/sp3 and a 5+ year old laptop with vista. Due to their age and a lack of updated drivers I only get a marginal speedup from using webgl. I have both android and ios devices but I haven't tested on them.

  • newt

    I'd rather not remove features if I can.

    clrammer

    Opps, re-download the plugin to eliminate the javascript error.

    And yeah, the performance issue is related to webgl and this plugin.

  • keepee

    I don't have access to c2 ATM but my thought on how to handle scrolling and such would be to have the canvas' on a fixed layer and just translate the image point positions to the fixed layer. I believe there are some system expressions that can do the conversion. Everything else could be on other layers that scroll and shouldn't need repositioning to paste... I may be wrong as I haven't tried pasting to another layer that has a differing offset. If it doesn't then the falloffs and such will have to be moved before pasting and then moved back after.

  • Fixed the memory leak with the canvas plugin. I updated the download in it's topic.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just did an update to fix to eliminate the memory leak when using webgl. Download on first post.

    I also isolated the reason the minifier fails down to the floodfill function, but beyond that I don't know what needs to be changed. So still no fix other than possibly removing that feature.

    Ashley is there a way to display an error log of the closure compiler if it fails? I could not find any laying around the c2 folder.

    SirSpunky

    It is slow with webgl on because it copies the canvas to a texture every frame. It's faster with webgl off as it avoids doing that.

  • keepee tulamide

    Is webgl enabled in the project properties? The canvas plugin has issues with webgl. Namely a performance drop from copying the canvas to a texture for drawing and a memory leak on some systems because the texture isn't freed despite the code telling it to do so. At any rate, disabling webgl should remove the issue at least until I manage a better solution.

    So unfortunately this is a known issue that is long overdue for me to fix.

  • https://dl.dropboxusercontent.com/u/5426011/examples18/shadow_cast_2.capxr142

    Yet another shadow caster example but this one is has a capx to dissect. It's probably very similar to what keepee did in his example. The shape of the objects is defined by imagepoints.

    Features:

    * Colored additive lights.

    * Changeable shadow color.

    * Adjustable resolution to get a balance between look and performance.

  • You could just sort all the pieces at once. It's not as concise as only sorting the relevant pieces but it sure is simpler to implement and debug.

    For each seekerPart ordered by seekerPart.x*10000+seekerPart.y

    --- seekerpart send to front

    The 10000 is just an arbitrary number larger than the layout height.

  • One way to do it would be to add a "wait array.curX*1.0 seconds" action right above the set position action. Just change the 1.0 to how many seconds each position should have.