How to use One spritesheet to run multiple animations ?

Get help using Construct 2

Post » Sun Jan 29, 2017 12:03 pm

Hello,
In order to save memory I would like to import one big spritesheet and create multiple animations with the same spritesheet. But when I'm trying to make 3 animations like "Idle" "Walk" and "Jump" I'm obliged to open the same spritesheet 3 times in each animation, so It costs 3 times more memory.
Should I create only 1 Animation for the whole spritesheet and program the animation myself.

For instance :
Event : When function Anim("Run") is called -> set animation frame to 39 -> start animation from current frame -> Set Instance Variable to "Run"
Event : If Instance Variable = "Run" & Frame = 50 -> Set animation frame to 39 (to loop the animation)

What do you advise me ?
Thx
B
13
S
2
Posts: 32
Reputation: 697

Post » Sun Jan 29, 2017 7:05 pm

Just delete the frames that you're not using on each animation?
B
45
S
15
G
73
Posts: 2,008
Reputation: 43,398

Post » Mon Jan 30, 2017 3:19 am

Lol, thanks Plinkie,
it really works and it's memory saving !! (I was convinced that opening the same spritesheet several time to create different animation would costs more memory even with erasing the unnecessary frames)
I feel more reasured for my game now !
B
13
S
2
Posts: 32
Reputation: 697


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests