Tuesday, March 10, 2015
I've Done The Math. Time To Course Correct.
Time for a "mathy" post that probably isn't the most exciting thing, but its what has got me rethinking my animation system. First off, I'm not redesigning any art or anything like that. The problem I'm hitting is my memory use. Definitely not download size, just the memory being used. Its getting a little out of control. I blame it on my PNG's being converted to PNG-32's, but there is nothing I can do.
I did the math, and of the 178 megs of memory I'm using with the game running (no buildings or enemies in there), 116 megs of it is my player. The biggest chunk of the player's animation is the different flight angles. Basically, I have a set of start, looping, and stopping animation for a bunch of angles when flying (they get mirrored too). I also have a set of them for for whether the player is holding a civilian and another set if they are holding an object with possibly more to come. Each group of these is 37 megabytes. That is a big chunk.
I've been going back and forth on this and I need to get smarter about reusing animation. So the game plan is to take make a version of those flight angles and cut off everything from the chest up. Then, I can just pin art for holding a civilian or for holding a box to the front of that art. I'd be saving myself a lot of memory and opening up the possibility of more poses for carrying things. Its best for the long run, but might be a pain. More to come.