How do I check, if sprite is fully covered by paint-color-sprites?

0 favourites
  • 6 posts
From the Asset Store
you can add, remove and reorder list items and many more
  • Hi,

    I'm trying to check, when a sprite

    In my game, I want to paint a certain area eith a brush-sprite. So far, so good.

    Then, I want to check, when the arae is fully covered with paint (that no white spots are seen). So far, no success :)

    Can somebody help me out? Thanks very much!


  • Depending on your painting system...

    A tilemap utilizing 1 pixel tile sizes is a good way to manipulate and access information about the state of any given pixel. You can make it invisible and just use it to record and check tile states.

    Otherwise if you actually want to check the color of each pixel, you can use the drawing canvas plugin, take a snapshot, and loop through every pixel to check the snapshot RGBa on every pixel. Unless your paintable area is very small, I don't recommend this as a feasible solution, as it would probably be too resource intensive.

  • Hi,

    damn, as I'm working with construct 2, I posted in the wrong forum. Sorry.

    Is there a way to do it in c2?

    And is there a way to move the topic in the right forum? :)

    Sorry again and thanks!


  • Moved to the C2 How Do I section as requested

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can do the same things oosyrag suggested in C2.

    Either use a tilemap with very small tiles (1x1 or 2x2 px), or you can read pixel data from the image with Canvas addon.

  • Hi,

    thanks, I will try that. Because it's no rectangle-shaped-sprite, I will try reading thepixel data.

    I already took alook at it in c3-free version and was not sure, how to "loop through every pixel to check the snapshot RGBa on every pixel", but I will try again. Maybe I can get back to you with the kind request for one more tip regarding that.

    Thanks so far!


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