Why the fps drop when using the Save system?

0 favourites
  • 9 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Hi all

    I'm using the Save / Load system on my platform game, And every time the player collide with the save sprite ( To save the game for that position ) The Fps drop for 1-2 seconds.

    Is this normal, and can i avoid this?

    Thank's alot for any help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Naturally it takes time to write to disc. Do you have static objects that don't need to be saved (scenery etc.) with the 'don't save' behaviour? Search the official tutorials about saving games. If it continues to take a few seconds you could pop up a 'saving' message.

  • Thank's for the replay.

    I'm already using the "No Save" for some sprites, I will add it to some more and test, I hope this will fix the problem.

  • I'm struggling with loading and saving at the moment too. Haven't quite got it 100%. In fact I removed the Don't save behaviour because I thought it was causing issues but it should work.

  • You are using the savestate system to save the game. While you can use the savestate system and Ashley even shows an example. It really isn't the best way to do it.

    Using the savestate system saves every object and every bit of data on those objects. This means all the static terrains that never changes. all the background art everything saves. This results in a save file where 99.5+% of useless data. This actually uses up a lot of save space. I suggest just printing out a few objects just to see what get's written. You will be surprised.

    So of course there is a behavior to stop saving certain objects. Every tree position doesn't need to be saved. So you used the behavior to stop saving data on certain objects. And this is better approach. As this will reduce the amount of data you save. This will result in a much smaller file. But probably still 90% of information you won't need.

    Keep in mind that the save system is a savestate which is meant to mimic the state of the game in memory. Including all the global values that carry over between layouts. Think of this is needing to reload a game on a mobile device when switching apps. Players except to precisly resume their game.

    A save game only needs to save pertinent data that has meaning and doesn't need to reduplicate the memory state of the game. Mario, Assasins Creed, bioshock, GTA..... don't do save states. They record meaning information on progress and positional information.

    So your jerk pause for 1-2 seconds is likely due to writing far more information you need. I wrote a savegame for The Blue Code and the save is unnoticeable because the data is less 300byes. In relation 1object in savestate is about 200+bytes. So you could be writing possible 100's kb of datam heck maybe even in the mb.

    I suggest ideally to use proper save information for save games. And use save state for resuming games if your on mobile. It's more work though as you need to store the data and interpret the data. Where the save state is certainly far more convenient.

  • hi,

    it depend on your event

  • jayderyu

    Thank's alot for this information,s, I didn't know that top games don't use save system.

  • matrixreal

    I'm using this:

    Player on collision with checkpoint - Save to save slot

    Player on Die - Load from save slot

  • No. They don't do "save state". They do "save games". I may have slipped on the keyboard when typing the difference on save game and save state. I will claim error if that's the case. C2 save system is a form of "SaveState"


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