User Tag List

Results 1 to 6 of 6

Thread: Auto save with an array issue

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Auto save with an array issue

    So I'm attempting to create an auto save system for my game which saves the game every 5 seconds or so... The issue is that the array for my world data is already over 1MB in size and growing, and when I save the array, the game "hiccups" for a split second while it's saving. There's a noticeable lag which is really unacceptable for any game every 5 seconds of play.


    So is there any trick or way of auto saving an array while avoiding this issue? Or am I going to be forced to having the player manually save their game? How do other games save data on the fly without it causing lag issues?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,320
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Is it a text array? Text arrays are slow to save. We could optimize it but I'm not sure this will be enough.

    Anyway, maybe use a global array, and save it at the end of a frame or when the app ends?

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    It's a number array that's like 1500 X dimension and 10 Y dimension.

    There's just no way to currently save like a small bit of data at a time. It's save the whole file or nothing.

    Saving at app end could work but then if the game or computer crashes you'd lose hours of progress.

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    It appears the Ini++ object can save/load objects including it's variables and strings... Only issue is that it appears the latest version of the extension the object load isn't working. Anyone know who I'd contact about getting it fixed?

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, something about the folder pathing was screwing it up. I got the saving/loading of objects working with Ini++... I'll test to see if this is a viable solution

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,301
    Mentioned
    94 Post(s)
    Tagged
    0 Thread(s)
    Surely you don't need to save to a file every 5 seconds? Wouldn't it be enough to save to RAM every 5 seconds, and then just save what you have in RAM to a file every few minutes and/or when the user quits? You could potentially even capture an alt-f4 keypress and automatically save then.

Similar Threads

  1. Way of auto-compressing array files?
    By SharpS in forum Fusion 2.5
    Replies: 4
    Last Post: 11th January 2018, 06:29 AM
  2. Does mmf2.5 have any auto save feature?
    By ratty in forum Fusion 2.5
    Replies: 14
    Last Post: 9th March 2017, 08:11 AM
  3. Add an AUTO SAVE FEATURE for your game. Tutorial
    By Sparckman in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 23rd July 2016, 09:21 PM
  4. android auto save value - example
    By Sparckman in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 2nd June 2015, 02:48 PM
  5. MMF2 Auto-Save
    By variant in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 17th November 2009, 04:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •