[behavior] pixel collide

Post your work in progress addons and get feedback

Post » Sat Feb 20, 2016 1:32 pm

Test pixel overlapping between sprite and @R0J0hound 's canvas.

see this demo first
- drag to draw circles on the canvas
- red ball will bounce off and erase some pixels while overlapping any pixels on canvas

Document, behavior and sample capx are included.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Post » Sat Feb 20, 2016 3:23 pm

Is it made to work with just R0J0hound 's Canvas, or can it be used to test for other objects that don't have the condition?
Nice idea btw.
Image ImageImage
B
171
S
50
G
179
Posts: 8,390
Reputation: 113,474

Post » Sat Feb 20, 2016 3:29 pm

@newt

Just for R0J0hound 's Canvas plugin, which is the only one canvas plugin in C2.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Post » Sat Feb 20, 2016 3:49 pm

:idea: :idea: :idea: I have a game idea for this plugin :) :D
Image
B
39
S
12
G
2
Posts: 323
Reputation: 3,898

Post » Sat Feb 27, 2016 11:43 pm

Nice work @rexrainbow!

Must the canvas start from 0,0 coordinate for it to work properly though? I find that setting the canvas to e.g. 0,10 or dynamically during run-time after deleting the current canvas makes the "is overlapping/on collision" out of sync.

Also, any chance for the pixel collision to work on moving canvases? Many thanks! :)
B
15
S
7
G
34
Posts: 55
Reputation: 18,478

Post » Sun Feb 28, 2016 1:09 am

Update

Fix bug while canvas object is not a (0,0).


@bloodshot
Please download this behavior again, and try this test capx.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Post » Sun Feb 28, 2016 3:27 am

Beautiful!! I've just ran it. The sample capx looks wicked! I imagined the hulk on rampage! :D CPU went up but i guess it was fairly reasonable. It dropped down as soon as it cleared its path.
Anyhow, I think this should be one of the default behaviors built into C2 along with @R0J0hound's Canvas.

Speaking of canvases, do you think you could also look into @Pode's SVG Canvas Plugin? Or perhaps come up with a better SVG support? Cheers! :)
B
15
S
7
G
34
Posts: 55
Reputation: 18,478

Post » Sun Feb 28, 2016 4:01 am

@bloodshot

I had no plan for SVG html element recently, sorry.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Post » Sun May 22, 2016 2:37 pm

hey @rexrainbow cool stuff. I tryied "push out" action, but it does not work
B
45
S
11
G
4
Posts: 517
Reputation: 7,398

Post » Tue May 24, 2016 4:17 am

Update

Fix bug of "action:push out". ( tested capx)


@xoros

Fixed, please download it again, and thanks for notification.
B
109
S
27
G
277
Posts: 4,482
Reputation: 154,924

Next

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 2 guests