Does multiple layout improve performance?

Get help using Construct 2

Post » Wed May 28, 2014 5:25 am

I have a game that has multiple levels, and not all the assets are used in one layout. Is there any performance benefit or drawback if I have multiple layout per level. I create object instances that I only use in a given layout, so instead of squeezing everything in one layout i plan to create them separately. Thanks.
sleep is only for the weak!
B
91
S
30
G
12
Posts: 139
Reputation: 11,991

Post » Wed May 28, 2014 12:06 pm

Each layout is a level for the most part. Or each layout can be a part of a level. Anything that needs to be persisted between layouts should be tracked with global variables. It is advised to have one layout that has a copy of all your sprites (one that the player never actually goes to) so that you can spawn instances of sprites without any errors. You cannot spawn an instance of a sprite if it does not exist in at least one layout. So create a sandbox layout, put one copy of each sprite in it and then just never let the player go to that particular layout. You can then use events to spawn instances of any of your sprites in any of your other layouts without issues.

The manual and basic tutorials cover all of this in pretty good detail so I definitely recommend going through them. Hope this helps.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Wed May 28, 2014 9:09 pm

It probably makes no difference.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Thu May 29, 2014 9:48 pm

thats not affect performance like ashley says
and on every end of layout there is clean memory and destroy all object

i prefer to create a lot of layout than one layout with multiple and complicated script and object
B
46
S
16
G
8
Posts: 794
Reputation: 8,335


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests