How to load many frames once ?

For questions about using Classic.

Post » Sun Dec 07, 2014 9:55 am

Hello,

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 !
B
7
S
1
Posts: 58
Reputation: 683

Post » Sat Dec 13, 2014 7:20 am

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.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests