Imported Sprite Strip export into more than 1 ?

Get help using Construct 2

Post » Wed May 22, 2013 1:24 pm

I am trying to import sprite strip from 1 sprite sheet of about 14 frames , but when i export it gets exported into 4 ( 2 of 6 frames , 1 of 1 frame, 1 of 1 frame).

Isn't suppose to produce only 1 sheet for faster downloading ?

I have about 350 frames of animation , any help on how to get it into a sprite animation so that it loads faster during initial load even without the cache ?

Please provide any other ideas or tricks as well.
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Wed May 22, 2013 4:22 pm

When you click import spritesheet you should get a box asking how many horizontal and vertical cuts you'd like to make.

Edit: Sorry I thought you had problems with importing.Nimtrix2013-05-22 19:11:59
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed May 22, 2013 5:59 pm

Upon export all frames of animation in the sprite will combine into files that are the size of power of 2 (8,16,32,64,128,256,512,1024) in size.

It efficiently saves them based on how much space your animation frames on a single sprite takes up. It's more efficient to load 2 64x64 sheets and 2 smaller sheets than it is to load 1 128x128, especially if majority of the space in the 128x128 would be transparent. Of course once the majority of 1 128x128 would be filled by sprites, upon export Construct 2 will use that size to store all the frames until it needs more space, then it'll make another file with the size of power of 2 and repeat the process until the next power of 2 size.

Downloading you download less since you are not downloading empty pixels, and memory wise you are not loading empty pixels as well. Graphically wise your card works more efficiently with power of 2 sized images as well.

Basically, C2 already efficiently handles sprite images upon export.
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Fri May 24, 2013 1:38 am

hmm , i created another 56 frame sprite sheet, and when it exported it just reduced it into 51 sheets just 5 less, not sure if it makes sense , particularly when you are running in iOS IPad the sheer number of files that it has to download really slow down the loading process of the game when launching the game from a webserver even with a local one that is on the LAN (looks like there is a limit on the number of http client connection that it can open ).

Btw , i am using the shoebox to create the sprite sheet. http://renderhjs.net/shoebox/?

Why i am seeing this behavior , is it because of the kind of tool i am using ? please help what am i doing wrong ?

basically i wanted to load about 10 animation into a sprite averaging about 35 frames (total 350 frames) and this takes a very long time , Please help !
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Fri May 24, 2013 6:29 am

anyone please ? My sprite size is 500x600 on a retina display of 2048 x 1536 which in case it makes the sprite sheet kind of useless, Not sure why scirra is restricting to 512 x 512 spritesheet size ?
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Fri May 24, 2013 3:25 pm

@tringio - we have explained the reasons Construct 2 exports spritesheets the way it does in some detail in our blog: https://www.scirra.com/blog/87/under-the-hood-spritesheets-in-construct-2

Often imported images are sub-optimal; for example, a 1000 x 50 sprite sheet will likely be placed on a power-of-two size texture in memory, meaning instead of using 200kb of memory it uses 4mb, which is extremely wasteful and can quickly crash your game if you use too many of that kind of image. Therefore the square power-of-two cutting is deliberately designed to reduce memory usage.

The maximum square tile size is set to 512x512 for the reasons described in the blog post (minimising memory use; ensuring the loading bar doesn't appear to have hanged).

I would strongly recommend you do not use large numbers of large sprites, for the reasons described in the blog post Remember not to waste your memory.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, randomly and 21 guests