[PLUGIN] Canvas

From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • 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

  • Hello guys, I'm new to construct2 and I'm trying to create a colouring book for my 5 years old kid. I'm finding a lot of good words on Canvas plugin but I'm finding it hard to use the plugin (I come form an art background).

    Is there a tutorial or a guided help on how to take advantage of the this awesome plugin.

    Thanks a lot

  • check the Lemmings example, I'm pretty sure page 8 or 9 has another file you can use.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • zixofranic

    There isn't really any documentation but the are descriptions in the editor when adding expressions, actions or conditions.

    For a coloring book you want a paint bucket fill like mspaint right? Look at the "floodfill canvas with color" action to do that.

    However the only limitation with that is Just make sure the canvas is completely opaque, aka has no transparency. Transparency can cause the flood fill to hang the game currently.

  • R0J0hound ghost thanks you guys, I'll check it out

  • Hi, I'm also trying to do a coloring book and I can't find a way to make it work with just a simple test. Firefox or chrome hang for a while then pop-up the javascript error using the floodfill action. What I'm doing wrong? Attached is a .capx of the test I'm trying.

  • Here you go, i had this problem too and almost cracked my head over it, the problem is that flood fill can not work with non integer numbers, so add int() to your X and Y values and also using "red" as a color won't work, you need to give the color code or use rgb.

    [attachment=0:34d1nr3c][/attachment:34d1nr3c]

  • Here you go, i had this problem too and almost cracked my head over it, the problem is that flood fill can not work with non integer numbers, so add int() to your X and Y values and also using "red" as a color won't work, you need to give the color code or use rgb.

    [attachment=0:zey6xtd7][/attachment:zey6xtd7]

    Thank you! Now is working. I could never figure it out this solution.

  • Someone knows why in the example I provide the floodfill doesn't fill all and leaves white pixels between the black lines? Is something of the canvas or the drawing I'm using? Is there way yo have a clean floodfill without those white pixels?

  • leofenix , It's your picture. If you check closely you will find gray pixels on these areas. I crashed the blacks/whites and the result is much better. You can't get rid of a slim white outline around the black lines though, I don't know if that is a limitation on the Canvas plugin or there is some other way to do pixel perfect fills.

  • R0J0hound: I have found a bug - it won't let me paste layers containing tilemaps.

  • eli0s

    It's a limitation of the flood fill algorithm used. To be able to fill those gray pixels too would require an algo that fills pixels whose colors are close to the original by a threshold.

    PopperOfCorn

    It's a known bug when webgl is on. It works if webgl is off, but other than that I don't have a fix for this plugin. However look at the Paster plugin as it works there.

  • R0J0hound , I understand. The same happens even within Photoshop when you bucket fill antialiased lines. Only vector software overcome this limitation. TVPaint animation (which also use raster graphics) has a nice feature, it lets you "overfill" by an amount of pixels the flooded area, thus eliminating the gap around the lines, but it does it in a way that doesn't erase the lines, it colorizes the unpainted areas. Anyway, thanks for the clarification

  • Thanks for the plugin R0J0hound

  • Hey You've done some really nice work with this since the last time I used it before switching to paster. One question though. Are objects being pasted WITH their webgl effects going to be supported sometime in the future?

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