Question about performance of mobile and...

Get help using Construct 2

Post » Thu Feb 27, 2014 9:17 am

Hi all, I start to make a platform in 2d for a mobile.

I have a question about the layout and the performance... I make a tilemaps for all platform and solid, and for loading a level I will use the JSON file (easy way and best performance)

but the problem is for the "static" objects, I mean, for example the object like the coins on the map, obstacle etc... they are a sprite.

now my question is this, if I need to make 30 level, make 30 layout just for the position of the object and some variable of instance will be not very good for my opinion, so that, is possible to save the position in JSON in easy way?

I can make a event to make spawn some object, and after load the position or the variable for every object... I can make a static event like (spawn object --> set position) and for every level I will insert a lot of event...

another question, if I make 30 layout with different even sheets, (5 are load in every layout, and some event will load just in specific layout) how the phone will load everything?

thank you very much
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Thu Feb 27, 2014 9:35 am

I'm not 100% sure but believe me, it's a mess to save every single coordinate of a coin. This is a looooot of data to save (and the LocalStorage is quite slowly).
I think the best practice would be to design all your levels in different layouts.
As far as I know the layout only uses and draws what you need right now.
Maybe you can find more hints here: https://www.scirra.com/manual/134/performance-tips
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Thu Feb 27, 2014 12:49 pm

Maybe you want to use the existing support for savegames.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351

Post » Thu Feb 27, 2014 3:57 pm

Thank you for the reply

My achieve is to make just one layout for all of the level.

tilemaps are loading from JSON like (level1.json,level2.json..) etc and it's working. this means I can load a specific level if a player click in level 4 for example.

now the problem are the sprite.

I try to use savegame (powerfull) if I set the player "noSave" every sprite will save right?
where I can get the json file when I click savegame?

when I finish to make the level, I can save all of the data to JSON file. but every levels have different number of sprite, this doesn't make a problem right? I tried to savegame all of the sprite, remove some sprite from construct2, restart and reload and the sprite will regenerate in the level.

thank you very much again
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Fri Feb 28, 2014 7:14 am

Why you just want to make one layout?

If you set the player to "noSave", everything is saved but the player.
You can access the savegame with the SystemExpression SaveStateJSON .
You could've found all your answers in the link ashley posted.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 8 guests