How do I stop Drawing Canvas from clearing away my pastes?

0 favourites
  • 4 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • According to https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/drawing-canvas if I change the size of my drawing canvas, the next time I paste or draw something onto it, it will clear everything else away.

    Personally I have absolutely no idea why this would be a default behaviour, and it's now leading toward a second game that C3 can't achieve that C2 could do with ease using the Paster plugin (which in my opinion is significantly more superior).

    In any case, does anyone know a way around this? I have it set up so if someone is shot, it will spawn blood, then paste that blood onto the canvas so it's not using hundreds of sprites. However, every time the canvas zooms in, all the blood vanishes.

    The manual suggests that I can "if you clear and re-render the canvas in Every tick"... but it doesn't actually say how. There is no "re-render canvas" action, so I'm sat here scratching my head... yet again.

    I originally thought this was a bug, and reported it as such, but nope... apparently it's by design. Again, I have literally no idea why this would be preferable than... you know, it NOT deleting everything you've created onto the canvas. In fact, I can't think of a single example as to why it would be beneficial to delete everything.

    So yeah, is there a work around, or is it a useless plugin for this and I'm better off just spawning hundreds of blood sprites?

  • The canvas changes size when either the viewport changes, which you don't really have full control over, and when you change its size manually. Ideally you would not use manually changing the size of the canvas for zooming type effects.

    The only tool we have for non developer changes is the Drawing Canvas Condition "On resolution changed".

    I think the best solution using that would be storing a snapshot using the Binary plug in Local storage.

    That means replacing the snapshot incrementally, and there will be missed frames.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Seems odd that this wasn't an issue with Paster in Construct 2. It was able to be rotated, scaled, flipped... anything, and kept on going.

    I'll just have it spawn sprites that slowly fade away over time. Very disappointing.

  • I think there might be a middle ground where you paste the objects into the Drawing Canvas, and then snapshot it into a Sprite, again doing it not every tick.

    But that does mean you can use the Sprite for zooming.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)