Hello guys,
I have a bit of a weird problem. Our game allows for a lot of zoom, and therefore to have smooth animations we need to have pretty large 2d spritesheet.
One thing that is killing me is our artilleries. They rotate and shoot in each direction, and to maintain the visual quality we need each sheet is 4k. So each direction has a 4k sheet for shooting, and a 2k sheet for reloading, plus all together a single spritesheet for rotation.
This one is the main culprit.
As I noticed through the profiler that when the artillery is built, there is just the base state it's in loaded in memory. Once actions are taken, i.e. rotate reload and shoot in other directions, the other spritesheets are loaded in memory, but then they are kept there all the time.
Being as they are large as hell, and given that if the tower is facing direction X it will not be needing the shoot animation in direction Y at that moment, is there a way to unload those sheets when not needed, for example at the end of the animation or when rotation moves away from there?
Cheers,