I'm working on a spacegame project and each ship animation has 32 frames.
The problem is that I want to load them from a folder (System.AppPath + "/images/ship_1/" + frameId + ".png").
I already tried to load the anim frame each time it's needed from the folder but it uses a lot of cpu :/
So the question is, how can I load 32 frames once and then use them when I want (like if I created an animation on my sprite object with 32 frames)
(ps: i'm using UniqueSprite plugin)
Thanks in advance !
Develop games in your browser. Powerful, performant & highly capable.
I was in a similar situation and wanted it to load on startup. I think I instead had a blank regular sprite object and loaded the frames into each animation from folders. Try checking out the source code to my I Had Hope engine ( http://ihadhope.blogspot.com/ ), as I used two different methods of loading images from files for the levels.