What get's loaded into memory?

Discussion and feedback on Construct 2

Post » Tue Jun 24, 2014 12:35 am

Hi guys

Just wondering whether library objects that are not on the stage are still loaded into memory.

Let's say I had a low resolution sprite on stage and and a hires version in the library, would both be loaded?

Thank you in advance!
B
44
S
22
G
9
Posts: 142
Reputation: 9,053

Post » Tue Jun 24, 2014 10:54 am

Only images used on the current layout are loaded in to memory. Objects on other layouts are not loaded until you go to those layouts, and when you do so, objects on the old layout are unloaded from memory. This prevents large games running out of memory.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Tue Jun 24, 2014 11:42 am

Ashley wrote:Only images used on the current layout are loaded in to memory. Objects on other layouts are not loaded until you go to those layouts, and when you do so, objects on the old layout are unloaded from memory. This prevents large games running out of memory.


By "used on the current layout", does that implies also objects that are talked about inside the event sheet, even if none of them would actually appear in this particular layout?
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Jun 24, 2014 12:05 pm

@Aphrodite - no, only objects that are initially placed in the layout in the editor. If a different object is created at run-time, it will have to load it at the moment you create it, which could make the game momentarily stutter. To avoid that place any objects you might create just off the layout and destroy them on startup - they'll still be preloaded.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842


Return to Construct 2 General

Who is online

Users browsing this forum: Huemerson and 10 guests