0 Favourites

Question about performance of mobile and...

  • 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

  • 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

  • Maybe you want to use the existing support for savegames.

  • 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

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
331 35,573
Lordshiva1948's avatar
Lordshiva1948
Unread hot topic
353 32,110
yojona's avatar
yojona
Unread sticky
192 1,337,469
Kyatric's avatar
Kyatric Construct Team Support