Mobile performance suggestion

Discussion and feedback on Construct 2

Post » Fri Feb 10, 2012 5:34 pm

I know you are working on sprites loading into RAM per layout, but as an alternative to that(this would help my game)... Is there a way to only load the current frame of a sprite into RAM. This would be nice as a setting per frame of each sprite. Example: Load to Ram when visible, at start of layout, or at start of game.

Example: I have a sprite with a map of each level on different frames, this map sprite would load to RAM only the current frame per layout.
B
8
S
3
G
2
Posts: 107
Reputation: 2,219

Post » Fri Feb 10, 2012 6:40 pm

I've been wanting something like this for awhile, only a little different - basically a drop-down menu in the properties of a sprite that would set if the runtime should load all animations into memory upon loading the object, or only load the first animation. Sort of like how construct classic has a 'load all layout textures at start' and 'load only the current layout' modes, except with animations instead of layouts.

So, there could be an action to load or unload animations by name (they could load in the background while other stuff is happening), and an action to dump all but the current animation from memory. If the user used 'set animation' to an unloaded animation, then it would load that animation then. That could probably cause a pause, but MAN would that feature be useful to me!

My characters in loot pursuit have thousands of animation frames between them, many of those only being used once in the entire game. It's extremely impractical the way I'm having to do it now by sectioning off animations into separate objects and creating/alternating visibility between them for memory savings.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sat Feb 11, 2012 1:49 am

We basically were planning to re-add Construct Classic's controls here, but we can make some finer tweaks when we come to do it. I didn't think anyone had that big games that needed it yet.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Sat Feb 11, 2012 1:56 am

Maybe they don't want to tackle a big game because features like that aren't in place yet... I'm partially in that boat, myself. No rush though!
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sat Feb 11, 2012 2:00 am

@Arima does toggling visiblity add and remove images from RAM?

@Ashley you were asking to see my game before, it is on Chrome now here is the link:
https://chrome.google.com/webstore/detail/mjjcfjkkmchjkolljhofkbgkdookokgk?utm_source=chrome-ntp-icon

or just do a search for "Maze Manor" on the Chrome Store.
B
8
S
3
G
2
Posts: 107
Reputation: 2,219

Post » Sat Feb 11, 2012 2:56 am

@Bert - no. I guess I didn't describe it properly - I have common animations in one object, then the less common ones in other objects. By keeping the less common animations in another object that's not in the layout in CC, it keeps it out of VRAM.

I create an instance of the uncommon animations objects when I need them, and then swap visibility between the common animations object and uncommon animations object as needed.Arima2012-02-11 02:59:43
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397


Return to Construct 2 General

Who is online

Users browsing this forum: 8tomo8 and 11 guests