Sprite Size and required space

Get help using Construct 2

Post » Fri Feb 28, 2014 10:25 am

I am making a game that has almost 20 enemies.
Each enemy has 3 animations.
Each animation has 60 frames.
Each frame rounds between 102x200 to 200x200.
In terms of space, each enemy requires around 5 mb, with all the animation frames.
With 20 enemies it requires almost 100 mb, only from enemy sprites!
That's a lot...
Im doing my animations in Spriter, but im exporting it to construct2.
I plan to do my game for mobile and desktop.
Im exporting larger sprites so it can go to 1920x1080 desktop and not lose quality.
But the game is so so large, it takes lots of time to load on weaker smartphones and pcs..
what is my solution here?
thank you!
B
16
S
3
G
1
Posts: 85
Reputation: 2,260

Post » Fri Feb 28, 2014 10:34 am

1. Solution: Cheat a little bit. Use 30 Frames but run them half the speed. Sometimes this works.
2. Solution: This is really dirty, but sometimes I also do it: When your project is 100% finished, go to tinypng.com. Then resize all your files and pack them back in your folder. Voilá. Make sure you won't change anything in the project, since you have to do it every time you change something in c2.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Feb 28, 2014 10:38 am

Compressing PNGs does not save memory. They are decompressed when loaded (effectively to 32-bit BMP) so the file size does not affect that. Also C2 does very good compression already on export - see Construct 2's export-time optimisations.

60 animation frames is a lot. See Remember not to waste your memory.
Scirra Founder
B
397
S
236
G
88
Posts: 24,395
Reputation: 194,460

Post » Fri Feb 28, 2014 10:40 am

@Ashley: But doesnt it help for example for other exporters like cocoonjs? I mean don't they have their own image handling?
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Feb 28, 2014 10:44 am

No, it doesn't. Every single platform decompresses images before rendering them. It is not actually possible to render compressed formats like PNG and JPEG without first decompressing them.
Scirra Founder
B
397
S
236
G
88
Posts: 24,395
Reputation: 194,460

Post » Fri Feb 28, 2014 10:55 am

the solution to your problem is to use spriter's plugin for construct.
what it does is that it uses only one set of png's per character and regardless how many animations you have for him ,it just takes the same ones and tweens them in real time during runtime. it is also A LOT smoother than using traditional png's for animation and you can speed it up or slow it down in your code.

p.s just dont use tilemaps for your game if you use the spriter plugin..... !#[email protected]%%^&%^&%^&*[email protected]#
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Fri Feb 28, 2014 11:08 am

thank you!
tiny png is very nice, i download a software named PNGoo.
now i can reduce my pngs to half the space and it has the same quality.
i will try do that to all my graphics in the game and see how it works.
im doing it right now, but i can see that the download size is going down but the memory use is the same..
thats because construct2 already does the png compression
B
16
S
3
G
1
Posts: 85
Reputation: 2,260

Post » Fri Feb 28, 2014 11:13 am

i tried to insert the spriter plugin in my project, but i have some issues:

1 - when i run the animation inside construct 2 with spriter plugin some little movements of the animations look like they are only 4 frames.. like everything is 60 fps smooth and only the head, that moves only a little is like 4 fps..
2 - i have z order by y in my game, and i dont know how i can do this with spriter..
3 - my enemies have a brightness webglfx that lights up when enemies take a it, im not sure how i can do that with spriter (having 5 sprites with effect against 1, i dont know the performance impact)
4 - im not sure if the perfomance is better in cocoon..
B
16
S
3
G
1
Posts: 85
Reputation: 2,260

Post » Fri Feb 28, 2014 11:15 am

That's what I meant before. Of course the memory size is the same, but at least the download size is smaller. Potential users might not download huge apps, so I think it's worth it :)
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Feb 28, 2014 11:18 am

yes, but i really want to improve the performance of the game, it has already 200mb of memory use and i have only 7 enemies from 20!
B
16
S
3
G
1
Posts: 85
Reputation: 2,260

Next

Return to How do I....?

Who is online

Users browsing this forum: vutankhoa2015 and 22 guests