Creating a scratch card effect

Get help using Construct 2

Post » Thu May 21, 2015 1:13 am

@lukezero
I briefly mentioned how above and here is an example:
https://www.dropbox.com/s/mzjg78cf38zqa ... .capx?dl=1
/examples27/scratcher_canvas_with_percent_clear2.capx

The issue is it's slow to check all the pixels in the canvas. I first tried the .AsJSON method but it would make the game freeze up for too long while checking. Next I used the .AlphaAt(x,y) expression, but only checked so many pixels per second to even it out so it wouldn't freeze. The draw back is it would take a bit to check all the pixels. What I settled on was to first paste the canvas to a lower resolution canvas and check the pixels on that so we could do it per frame.
Last edited by R0J0hound on Mon May 22, 2017 1:21 am, edited 1 time in total.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Thu May 21, 2015 1:49 am

It works perfectly with your plugin, @R0J0hound!

Thanks one more time for your help! :D
B
38
S
9
G
3
Posts: 258
Reputation: 4,324

Previous

Return to How do I....?

Who is online

Users browsing this forum: guannstar and 19 guests