[PLUGIN] Tiled Sprite

Post your completed addons to share with the community

Post » Wed Jun 13, 2012 10:29 am

wgfunstorm, thanks for comment. I`am also novice to html5( and for C2), but advanced in php+mysql and javascript, so I`ll try to make it on canvas2d if you need it)). Any support and comments will be great)
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Thu Jun 14, 2012 7:16 pm

I definitely need it... I could save 12% size in my image folder by upgrading to r92 with spritesheets, but then I would have to cut a feature that uses tiled sheets. What you're doing is fantastic!

I'm not sure if you saw by the way, but Ashley suggested a way of doing it in canvas2d, maybe it's a start:

[QUOTE]You can fix your plugin but it would be a little complicated. To tile a spritesheet frame you need to:
1) make a new canvas and get a 2D context
2) drawImage() the sprite's image on to it (you'll have to see the new code in Sprite's draw() which shows how to draw the part from the spritesheet)
3) make a new Image() and set its src to canvas.toDataURL() - now you have a standalone image of the section from the spritesheet
4) now you can make a pattern of that image and draw the section tiled[/QUOTE]
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Fri Jun 15, 2012 5:37 am

wgfunstorm, i`ll try to make it in about two days. After that i`ll go in adventure for 1.5 month. I`m not promise, but i`ll try to make it before my leaving. Thanks for support and message from Ashley))
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Tue Jul 17, 2012 4:42 pm

This is exactly what I was looking for - thank you so much for your hard work. I know you are off on adventures right now but I think I noticed a bug or two.

1) Same issue as already mentioned with positioning problems. Requires offsetting the tiled sprite at 0,0.

2) Animation Speed appears to have no effect on the outcome. It's either all or nothing. A value of '0' does stop the animation. However, a value of "0.0001" produces the same results as '60'. It appears to my eyes to be playing at the max frame rate regardless of the speed setting.

Thanks again. This plugin is greatly needed in C2, imo.srealist2012-07-17 16:42:56
B
9
S
3
G
4
Posts: 80
Reputation: 3,268

Post » Tue Jul 17, 2012 4:47 pm

One other thing...

3) While animation parameters are available for tiled sprites as conditions, the animation parameters do not appear for actions. This makes it a bit limited as there's no way to have programmatic control over the animation settings.
B
9
S
3
G
4
Posts: 80
Reputation: 3,268

Post » Tue Jan 08, 2013 12:05 am

@SirG
Hey there
Great plugin!
I'm making a construction game here
Is it possible to add support for collision polygons, like in sprites?
Then the collision shapes would also "tile" along with the graphics :)

EDIT:
Oh and as srealist said above me, I would also love to see sprite animation events support in there, like "set animation", and "set frame"lemo2013-01-08 00:21:34
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Tue Jan 08, 2013 7:50 am

Fantastic Plug-in SirG! Thanks for making it.
B
46
S
8
G
4
Posts: 414
Reputation: 6,830

Post » Tue Jan 08, 2013 4:38 pm

What's the advantage to using this compared to Tiled-Background?
B
27
S
9
G
5
Posts: 108
Reputation: 5,744

Post » Tue Jan 08, 2013 6:11 pm

hey this is cool, I requested this very thing 2 days ago, glad to see it already exists!
B
28
S
8
G
4
Posts: 767
Reputation: 5,940

Post » Thu Jan 17, 2013 4:59 pm

thank you for comments, i`ll try to update plugin.
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: vurzu and 4 guests