User Tag List

Results 1 to 4 of 4

Thread: When is the best time to Save a File?

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    Jan 2014
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    When is the best time to Save a File?

    Hi,

    I am in the later stages of a small game project, and am just looking through things to improve here and there for a more efficient app.

    I'm wondering what the best opportunity to save a file would be.

    The file only contains an array with a single Hi-Score, and only saves under one of the following conditions:

    - There is a new Hi-Score and the player clicks "Replay Level".

    - There is a new Hi-Score and the player clicks "Return to Menu".

    - There is a new Hi-Score and the player clicks the device "Back" or "Home" buttons.

    The menu and levels are contained within the same application frame, so the "Replay Level" and "Return to Menu" buttons simply restart the frame with separate "Start of Frame"-events, always loading the save file and setting the current Hi-Score to whatever was stored within.

    If there is a comprehensive Save / Load guide available, I would love a link!

    Thanks in advance!

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,824
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    I am guessing there is a high score for each level and I can't tell if you have one array that stores all the high scores or an array for each level.

    Here is my stab on what I might do:

    I might have an array that stored all the level numbers and the players high score for that level.

    When you load a level you pull out the old score to see is the player got a new high score you wanted to save.
    Of course if there isn't a score the old high score would be 0

    Then just save/update your array information whenever the player gets a newer high score for the level.

    I am not sure what you mean by a Save/Load guide -- If you can expand on what this guide is covering perhaps we can get one made.

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    Jan 2014
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the response, and sorry for not being clear enough in my original post.

    There is only one level (endless runner), but yes there is an array and it keeps track of the one hi-scor that I do have. This occurs upon game over, if the new score is better than the current hi-score. But the save file itself (wherein the array is kept) is only saved on the device when one of the buttons mentioned earlier is pressed.

    It is more the saving of the file I am after, since I worry that the process could either be interrupted or cause lag if it occurs at an inappropriate moment.

    As a quick follow-up question to that - is there a way to ensure a file always overwrites itself when saved, so there aren't a ton of duplicates being created? Or is this never an issue, and will the file always automatically overwrite itself?

    As for the guide, I mean a guide covering all the aspects of the saving and loading process. As with many functions in Fusion, new or intermediate users often have to do a lot of digging around the internet before they can puzzle together the required information. I have done this several times when I have required information on something I wasn't too familiar with yet. While the internet is a great source, it would be wonderful if there could be accessible guides available on these forums in the forms of Sticky-posts.

    These could begin by presenting an overview of a feature (such as saving and loading) for a given platform, before they then dissect the topic and explain elaborately but clearly how a person can save various information in an application. There are great guides within Fusion 2.5 itself, but sometimes it's great to have up-to-date information on a forum where people can ask questions and contribute to the material.

  4. #4
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,824
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)
    File access - Saving and loading is certainly one of the more resource heavy routines.
    So in general you would want to only do that when you needed to.

    The array file should just overwrite itself if it has the same name and unless Fusion crashes in the middle of the write it shouldn't get interrupted.

    I will see if we can add a save/loading guide on the list.
    I know we have a lot of guides coming up in the next few month as we shore up the docs.

Similar Threads

  1. LOAD/SAVE clone file in ARRAY FILE
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 20
    Last Post: 24th July 2015, 01:47 AM
  2. INI Save/Load Time
    By Alpha in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 16th January 2010, 10:11 AM
  3. [Bug] File Time object
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th October 2007, 07:31 PM
  4. FILE TIME OBJECT
    By imothep85 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 29th June 2007, 10:28 PM
  5. Save a file as .bmp
    By sTeBiE in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th November 2006, 12:43 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
  •