Question about spritesheets and custom plugins

For developers using the Construct 2 Javascript SDK

Post » Tue Oct 07, 2014 5:54 pm

I know construct 2 sometimes exports animations by building sprite-sheets, as i've read in this blog post.

From what i understood, spritesheet exporting is hardcoded to only happen with sprites when a game is exported, and third party plugins that use the animation editor will still export a series of images. My question is if this has changed, and if i'm understanding things right. I really don't want / can't have the images exported as a spritesheet for my particular purposes, so i need to make sure it will never happen.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Sat Oct 11, 2014 5:15 pm

Anyone have any idea? It has to work for webgl mode specifically, as my plugin only works with webgl.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Sat Oct 11, 2014 5:42 pm

The options are @Ashley adds something, make your own plug, or load the images via url, still needs dummy frames however.
Image ImageImage
B
172
S
50
G
182
Posts: 8,439
Reputation: 115,097

Post » Sat Oct 11, 2014 7:07 pm

The only thought that comes to mind is to try using pf_animations in a plugin and export to see if a spritesheet is generated.
B
94
S
33
G
117
Posts: 5,392
Reputation: 75,345

Post » Sat Oct 11, 2014 7:14 pm

so far when i've tried that i've gotten seperate frames as seperate images, but i haven't used C2 extensively enough to know if there's some threshold or particular number/combination of frames/animations/framesizes that triggers it to start exporting sprite-sheets.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Sat Oct 11, 2014 7:24 pm

Did a quick test and yes, sprite sheets are made for all plugins using pf_animations. On a side note it appears that only non-square power of two images are sprite sheeted. I first tried three 32x32 frames but on export they each stayed on their own image, also the sprite object did the same. I then resized them to 16x32 and the export did pack the images into sprite sheets.
B
94
S
33
G
117
Posts: 5,392
Reputation: 75,345

Post » Sat Oct 11, 2014 7:47 pm

Gah thats annoying, guess ill need to find some work around by parsing images to separate textures.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests