How do I optimize memory usage for Mobile.

0 favourites
  • 5 posts
From the Asset Store
Test and challenge your memory in this amazing Christmas themed memory game!
  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?

  • 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.

  • 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..

  • "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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)