How do I optimize memory usage for Mobile.

Get help using Construct 2

Post » Wed May 06, 2015 11:23 am

So far one of my characters in the game has well over 500 frames of animation.

For example: Only one of them is a 15 frame run cycle in 16 different directions as my game will be in a Isometric view which adds up to 240 frames just for running.

Then I have lower body 15 frame walking cycle in 8 directions. and a 5 frame upper body animation in 32 directions. total of 280 frames. approx 3k per png file.

Only these adds up to around 1.5 Mb of animations, and I need at least 4 characters with the same amount of animations. This is the minimum i want to use. And would actually want to double the number of directions.

Not even counting, death animations, idle animations. powerups etc, which will take me above 1000 frames per character.

Hopefully all character animations will fit on a 2048x2048 tilemap, which translates to 16mb of memory usage for just one character and I need 4.

And then we have the actual levels... UI, and everything else.

I got a few pointers in this post. https://www.scirra.com/blog/112/remember-not-to-waste-your-memory

Would using the character frames as SVG sprites do any difference? and would it be possible?
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Wed May 06, 2015 11:34 am

One way would be to reduce the number of frames in the animations
Another way would be to reduce the amount of animations
Another way would be to reduce the size of the animation-frames (by cropping them?)

Question is, what options are you prepared to look at?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 06, 2015 11:59 am

LittleStain wrote:One way would be to reduce the number of frames in the animations
Another way would be to reduce the amount of animations
Another way would be to reduce the size of the animation-frames (by cropping them?)

Question is, what options are you prepared to look at?


the character fits nicely on a 64x64 tile.

In general i would much prefer using the character and all the animations as a 3D model using Q3D plugin or similar. But not sure how well this one works on Android, iOS, Windows phone as an app, so I don't have to worry about rendering sprites in all the directions, and placing this character on a 2D isometric background.

Besides from that..... what I actually could do.

* Limit running directions to 8
* Reduce run cycle animation frames (not preferred i want smooth animations with a lot of frames)
* Downsize or crop the frames would be the most preferred option as I could quadruple the animations going from 64x64 pixel frames to 32x32 pixel frames, but i'm not really in to Pixel graphics. (character in my avatar is what will be used)

The walking/aiming animation i don't really wanna reduce the number of angles, as it would feel "steppy". It's quite crucial that the animations looks and feels smooth, i don't want to restrict any movement or aiming to 8 directions for example, as it's a precission/skill based game.

for the whole feel of the game, smooth animations are preferred.

I'm leaning towards trying out Q3D plugin for the character, but not if it would export well as an app on mobile phones.
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Wed May 06, 2015 12:11 pm

Well if your collision-polygons and origins are in the right position you could always check if using the crop function in the image editor would reduce framesize..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 06, 2015 12:57 pm

"the character fits nicely on a 64x64 tile."

For C2 sprite sheeting on export it will be better for you to not use 64x64 textures. Use 62x62 instead and don't forget to actually put 1px empty border around your sprites.

"upper body animation in 32 directions."

You will need to rethink that. 32 directions Is a lot for plain 2d game. It will use quite a bit of memory but that's not important. Most important thing is you will need to edit them frame by frame in C2s Image Editor - hotspots, image points, collisions. It will take a LOT of time and especially patience to do that

I thought I'm gonna lose my mind while I was setting this up. C2s Image Editor is not helpful at all in doing that
https://www.scirra.com/store/royalty-free-graphics/isometric-soldier-72
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,598
Reputation: 34,823


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, dop2000, facecrime and 10 guests