Massive Art/Animation Concept

Discussion and feedback on Construct 2

Post » Sun Aug 24, 2014 6:25 pm

I've been thinking about this for a while, and wanted to see what other people thought. In a game, you have to keep animations and sprite sizes small in order to keep the memory usage as low as possible. Sometimes that makes it difficult to make a game look as good as most modern games look today. So I had a thought:

For long or large animations, could you do an "on animation finished" check, and in that event put a "create second part of the animation; destroy the first part"? And then "on second animation finished", "create first part of the animation and destroy the second part", effectively having the animation split as 2 sprites. In theory, they would never be loaded simultaneously clearing up the memory, and as long as what you're loading isn't too large, you wouldn't receive any hiccups.

I'm talking about this mainly for PC games, not mobile.

Would something like this work?
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Sun Aug 24, 2014 6:40 pm

B
34
S
9
G
3
Posts: 517
Reputation: 5,246

Post » Sun Aug 24, 2014 6:53 pm

@Katala - I'm glad I'm not the only one who thought of it! However I'm noticing; I made a text file that has the memory usage, and when sprites get destroyed, the memory usage isn't going down (I think it might be when I'm using the debug editor, but because the debug editor cannot include event sheets, I'm unable to use it properly)
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Sun Aug 24, 2014 7:04 pm

You could try using bigger images to see it better.
B
34
S
9
G
3
Posts: 517
Reputation: 5,246

Post » Mon Aug 25, 2014 7:05 am

I'm still curious if doing this is a big no-no...can anyone with actual development and programming experience chime in?
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Mon Aug 25, 2014 2:55 pm

Memory released from images don't occur until layout change. Any images loaded during a layout will remain in memory even if the all sprites are destroyed. Onlye once the layout changes does that memory release. this is a well discussed topic and people do want a way to release memory during a layout.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,038

Post » Mon Aug 25, 2014 4:41 pm

@jayderyu - thank you! that's exactly what I needed to know.
B
43
S
12
G
1
Posts: 545
Reputation: 4,246


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests