[PLUGIN] Canvas

Post your completed addons to share with the community

Post » Fri Nov 25, 2011 7:31 am

Ah... didn't see your post at the end of page 2... this is basically the same as Yann's modified version of your plugin :)

I'll just use the effect setting then :)
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Sun Nov 27, 2011 7:04 am

hey this is great, i managed to cut the holes in the canvas, but how did you managed the character falling into it?
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Sun Nov 27, 2011 7:39 am

ah i get it, you get the color at canvas and move the sprite if its a certain color
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Sun Nov 27, 2011 4:11 pm

Correct. Just like the way the old lemmings games worked :)
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Sun Nov 27, 2011 4:49 pm

@Ize
I can't run your second test. On Chrome I get white screen, on IE9 the loading freezes at 90%. First test works fine on Chrome, on IE9 it's same as with second.
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Sun Nov 27, 2011 7:07 pm

First one is normal canvas2d, on the second i enabled webgl... might have todo with that.

You can get my Lemmings example in .capx form here:
http://www.scirra.com/forum/my-examples_topic45860.html?KW=

Try if that works you... you can also try disabling webgl in the project settings so it only uses canvas2d and then it should work 100%
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Mon Dec 12, 2011 6:23 am

For saving, there is always the the canvas.toDataURL() method
B
14
S
3
G
1
Posts: 25
Reputation: 1,289

Post » Tue Dec 13, 2011 9:41 am

@Rojo
Would it be possible to be able to paste a Layer ?
I'd like that for 2 reasons :
1/ As there's no families yet, you have to list a bunch of sprite to paste by event. If we could paste a layer you would just need to group your pastable/not pastable sprite by layers
2/ If you have some zSorting, you would need to know each time what is in front of what and do the pasting in the proper sequence. If you paste the layer it should be automatic.

Also, I'm looking for a way to implement the drawGL function in the plugin but I can only generate black texture v__v (my game is a bit slow without webGL)

Anyway, I don't think I thanked you for this plugin so thanks (:Yann2011-12-13 09:43:48
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Dec 13, 2011 1:56 pm

@Yann: can you use the .toDataURL() to do what you want with layers ?
With that function, you can retrieve what's on C2's canvas, get it inside a png, and paste the png inside R0j0's canvas...
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Dec 13, 2011 2:47 pm

hu? really? I would prefer a simple Paste Layer, I'm looking into that right now. Just have to retreive the list of what is on the layer and paste them in order.
If I can't do that I'll try your way (:

By the way I made canvas work with webGL and also added some other hotspot option (the whole 9 basic ones)

I'll look into this paste layer thingy and PM the plugin to r0j0 so he can make a proper new release if what I did look ok to him (:Yann2011-12-13 14:47:58
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: EpicPixel and 1 guest