eli0s's Forum Posts

  • The grid follows the X/Y coordinate system whereas 0 X and 0 Y are on the top left corner. You can't change that.

    The resize thing is a bit tricky. Basically, if you change the value and don't hit enter/return or click somewhere in the ribbon, the values won't update. The tricky part is that in order to see the changes, you have to click inside the layout, otherwise the grid won't update.

    So, change value->hit Enter/Return or click anywhere on the ribbon->click inside layout->Done!

  • I have no experience with mobile and this is a very technical question for my understanding on how computers calculate internally.

    That being said, it is certainly possible and I don't believe there will be any difference performance wise. Construct calculates with float numbers so the .5 wont "confuse" it at all.

    The only thing that comes to my mind that is related to "performance" is the pixel rounding. If for some reason in your project settings you have the pixel rounding to on, then perhaps every now and then this .5 value will be round up (or down) and that might cause a 1 pixel jump which may be noticeable.

    • EDIT- That doesn't seem to affect performance neither. Check the following example -input decimal values to test CPU usage.

    http://www.eli0s.com/Tests/FloatDT.capx

  • Using spritesheets or series of sprites "reduces" Spine to just an other animating software. The real power (as with Spriter) lays in small file size and, even more importantly, in features like animation blending. My point is that for the most part not having an importer/native plugin defeats the purpose of using these software.

  • One obvious workaround would be to make your background sprites fully opaque (you'll have to "bake" the gradient in to them) and put the sun and the moon sprites on a Layer behind the BG layer/Objects. Of Course, the way you have it now provides the opportunity to blend the the BG sprites with the BG sky color, like an atmospheric haze and you will lose that ability...

    I am also interested in ways to do masking, I am forced to believe that there isn't an easy or effective way to do it in HTML5. And yes, I've seen the blend modes template, for the love of god, I can't replicate anything useful from that.

    Masking should work like clipping layers in Photoshop or, even better, as within After Effects and have the ability to exist from object level (use a sprite to mask on other sprite(s)), to layer level (use a layer to mask other layer(s)).

  • Neither example makes use of the canvas plugin at all.

    In your last post, the first link that you mention (https://www.scirra.com/forum/is-there-a-way-to-give-a-sprite-a-trail_p557543?#p557543) has a post from Yann that use the Canvas plugin (http://dl.dropbox.com/u/23551572/C2/trail.capx).

    -EDIT-

    The more I think of it, the more I conclude that R0J0hound also meant not using the canvas plugin for the trail effect...

    So thanks anyway zenox98

  • zenox98

    All of those examples basically can be summed in to two categories. The first uses a sprite as a trail and this sprite is being spawned every tick or x seconds. The second uses the canvas plugin in some way, just as in the R0J0hound's example found in page 5 in this topic.

    The first method, although very flexible, has a major disadvantage, if you have many objects that leave trails (and further more the trails are long), you have to spawn many-many sprites, so there ought to be a performance issues somewhere.

    The second method, on the other hand, does not require any number of sprites, but I renders a weird result, best viewed when the opacity values of the "fill canvas with color" action, or the object that has the destination out blend, are very low. The thing is that you'll need low opacity values if you want long trails.

    I was hopping that in his last post, R0J0hound has something in mind that uses the canvas object and he was not referring the methods that are under the "spawn sprite trails" category...

  • +1

    I think that if the sine behavior had some conditions that compared the progress, it would add a lot to it's functionality

    In the meantime, perhaps the LiteTween and/or the EaseTween behaviors might prove even more useful for the thing that you want to do.

    https://www.scirra.com/forum/behavior-litetween_t70700?&hilit=EaseTween

  • So unless another creative solution is found the fastest way will probably be to use fading sprites.

    R0J0hound can you please show as a practical example with fading sprites..? I tried to use the fade behavior or setting the sprite into an empty frame after a few seconds, but the result is that the main sprite (the one that should leave the trail) just disappears.

  • Unfortunately I can confirm that... R0J0hound is there a way around the "number rounding when the colors blend" (what ever this thing is ) ? I find it strange that no one has mentioned this before..!

    -EDIT-

    I thing the problem is that the "eraser" object (or the fill canvas with color) never actually adds up to be fully opaque, in other words it never reach 100% of its color value.

    See the following example:

    http://www.eli0s.com/Tests/CanvasTests/CanvasNotReachingBlack.capx

    I use two canvas objects, on the left one, every tick I fill the canvas with black at 0.01 alpha and on the right I paste a black sprite object with 1% opacity. In theory, in both cases after 100 clicks (~1.4 seconds) the canvas objects should be completely covered with black. But the results are different. They are not the same, the paste sprite method renders darker results than the fill canvas, but never the less it's far from being fully opaque.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Damn, you are right and I can't find any way around it...

  • Well, you can use the invisible rectangles' dimensions and position to directly control the spawning area. This way even if you move around the rectangle, or change its size, the changes will reflect in the spawning area.

    http://www.eli0s.com/Tests/invisible_rectangle.capx

  • Well, that doesn't seem to be the case. I am not sure that I get what cause the problem, but R0J0hound provided a solution.

    https://www.scirra.com/forum/plugin-canvas_t64239?start=290

    Just set the Blending of the eraser to Additive instead of Destination Out.

    Here are side to side comparisons: http://www.eli0s.com/Tests/CanvasTests/CanvasAdditiveBlend.capx

  • R0J0hound

    Thank you very much, that did the trick, now the trail fades completely, even if the "eraser" sprite has a very low opacity value, thus producing long, beautiful trails

    I took the liberty and arranged your example in a way that displays side to side comparison of both methods and I have to say that the results are very ...transparent

    http://www.eli0s.com/Tests/CanvasTests/CanvasAdditiveBlend.capx

    Thank you again

    Elias

  • The thing is that the opacity of the eraser affects the time of the fade out. The greater the value the fastest it fades but with better results.

    Ideally this shouldn't happen, even with 0.01 opacity, eventually it should have fade out completely.

    I posted this as a question to R0J0hound in the Canvas Plugin topic, so hopefully he will confirm it and give some advice.

  • I goes completely transparent for me on my computer. I don't know why it wouldn't... Does it fade at all?

    Yes, it does fade but not completely, a small trace is left behind. See the photos below.

    This is a screen capture from your example:

    On my monitor the trace is faint but clearly visible.

    Here I manipulated the brightness and contrast in Photoshop to enhance it. If the trail was 0% opaque in the first place, it shouldn't be visible at all, even with the brightness and contrast added, right?