0 Favourites

Question about optimisation for smartphones

  • If I will create all objects of my game behind some "loading" layout on game startup, whether they will be stored in the memory after?

    Because "saving to memory" process causes a FPS drop, and I want to avoid it during the game.

  • Which saving to memory process are you referring to ?

  • Which saving to memory process are you referring to ?

    I meant the moment when something is created for the first time in particular gaming session.

    For example, your hero has got in some room, then a figurative enemy spawned and caused FPS drop, but after this, every next enemy spawns without any trouble.

    He is "loaded to memory" in some kind. Am I right?

  • Yes that's correct. I believe each object loads into memory on a layout but once you leave that layout it is unloaded from memory, therefore you only need to load the relevant objects for that layout at any time.

    Loading all the game assets in your game on an initial layout won't work as they won't be there on the new layout. When you leave the layout you don't have to worry about any other objects being left behind unloaded, it is done automatically I think.

    The fact that there is a noticeable FPS drop on an object being created but not for future instances of that object seems like a problem with the object.

    You could try: leaving the enemy object on the layout view; when it is preloaded on moving to the layout during the game, does the FPS spike occur? Or is it just when the enemy is created/spawned?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Yes that's correct. I believe each object loads into memory on a layout but once you leave that layout it is unloaded from memory, therefore you only need to load the relevant objects for that layout at any time.

    Loading all the game assets in your game on an initial layout won't work as they won't be there on the new layout. When you leave the layout you don't have to worry about any other objects being left behind unloaded, it is done automatically I think.

    The fact that there is a noticeable FPS drop on an object being created but not for future instances of that object seems like a problem with the object.

    You could try: leaving the enemy object on the layout view; when it is preloaded on moving to the layout during the game, does the FPS spike occur? Or is it just when the enemy is created/spawned?

    I dont have any enemies in my game, that was just for example

    I just wanted to know how this memory manipulation things works, thanks alot for your answer!

  • Ah I see, no problem.

    I just had a brief look at the manual and it looks like the information is mostly here:

  • Ah I see, no problem.

    I just had a brief look at the manual and it looks like the information is mostly here:

    Thanks for the link, very usefull one. Shame on me, I didn't use the search.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)