[PLUGIN] Canvas

From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • sletts

    There may be some tutorials that I'm unaware of but it's pretty easy to use. Just look at the actions and most are self explanatory. It uses the HTML5 canvas so you could google tutorials for that and it's mostly a one to one with this plugin.

    There's an action to do a flood fill and erasing is done by pasting an object with the destination out blend mode.

    Replaying should just be a matter of making a list of the actions you used as you use them. Then just make some events to loop over the list and does what was saved. You probably could use an array to do the list.

  • sletts

    There may be some tutorials that I'm unaware of but it's pretty easy to use. Just look at the actions and most are self explanatory. It uses the HTML5 canvas so you could google tutorials for that and it's mostly a one to one with this plugin.

    There's an action to do a flood fill and erasing is done by pasting an object with the destination out blend mode.

    Replaying should just be a matter of making a list of the actions you used as you use them. Then just make some events to loop over the list and does what was saved. You probably could use an array to do the list.

    Thanks! Now that I've played a bit more I feel more confident.

    Regarding the replay of drawing - I'm a bit stuck. To clarify, I would like a student to be able to draw in the app (i.e. trace a word) and then click the 'replay' button and it will replay exactly what they just drew.

    Is that possible?

  • Yes it is possible. The plugin does nothing to help, but you can do it by other means.

  • Awesome plugin, very powerful.

    Just an observation: The expressions "RGBA At" (When called multiple times in the same frame update) causes a considerable impact on performance when playing the game with Firefox.

    Google Chrome seems to handle the same events pretty well.

    Thanks for sharing this, I love it!

  • I have a problem with your plugin, Paste layer results in a poor quality when the project properties is set to high quality scaling

  • There's a "resize canvas" action, that sets the texture size used by the canvas. By default it uses the size on the layout but for high quality scaling you'll want the texture size to be bigger. So for a canvas covering the viewport you'd want the texture size to be (windowwidth, windowheight) for example. Keep in mind that that action to change the canvas size will lose what was previously drawn.

  • I've got a replace color effect on my sprite here, but when I paste it onto the canvas, I get something like this.

    Am I missing something that makes it paste the right colors?

  • Fervir

    Effects don't work for this plugin. You can try the Paster plugin instead which was made with more webgl support.

  • Effects also don't work on Paster ... What a pity! For Canvas and Paster

    But i have a other problem/question: is it possible to use fill color from variables?

    What i mean:

    For example it works fine when i say <On start of layout> = <Fill canvas with color ""rgb(50,100,200)">, but it dont work when i use variables instead of the numbers (like "rgb(Canvas.Variable1, Canvas.Variable2, Canvas.Variable3)")

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can i resize canvas without blur? Like "Sample: Point" from the C2.

    Becouse i'm made a pixel art in 32x32... when i paste in canvas, i resize to 128x128, then when i invoke download frim the canvas, the image has same "blur".

  • Hey, can you inplement clearRect function?

  • Cherico

    You need to built the text with the & operator. For example: "rgb(" & variable1 & "," & variable2 & "," & variable3 & ")"

    andykenobi

    I haven't worked on this in a bit. I think I fixed the sampling in the paster plugin but I'm avoiding working on plugins.

    You can paste a sprite with the "destination-out" blend to erase. I'm probably not adding anything more to this plugin.

  • Hi R0J0hound

    Happy new year!

    I am using this amazing plugin that is helping me a lot but I am having some issue when I create a family with canvas: the game does not stop to load the files when I try to access it through the Safari. Do you know something about that? Is it possible to fix it or give some alternative solution to use in place of the canvas family?

    Thanks in advance.

  • I'm probably not adding anything more to this plugin.

    Thanks R0J0 for your great support with the plugin...However it beats me why scirra wouldn't build such a common and useful canvas feature as an in-built feature of C2? I find so many use cases where I have to use canvas and I strongly feel that this should be inbuilt into C2.

  • RBuster

    So it doesn't load if the canvas is in a family, and on on safari? I guess I never tested that. I'm not sure I'll get around to finding a fix.

    kmsravindra

    This was asked a few times previously. Basically Construct Classic had a plugin like this and since C2 didn't have one at the time so I made this. I probably beat them to it, that's all. Scirra doesn't seem to duplicate third party plugins just because.

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