User Tag List

Results 1 to 6 of 6

Thread: Saving - multiple saves and deleting saves

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module
    FGRaptor's Avatar
    Join Date
    Aug 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Saving - multiple saves and deleting saves

    Hello,

    I'm sorry for yet another topic about saves, but I couldn't really find the information I was looking for.

    Specifically, it's about having multiple save slots / save games and deleting saves from in-game.

    Basically for my current project I have a save and load system set up using arrays. It works fine. Basically, one array saves the data I need and creates a save file for it. Another array saves the savegame name for each slot.

    When you load a game, the second array is used to display the savegame names, the first one then loads the data. However, this gives me some problems. I made this after a tutorial from the tutorial site, and basically, as the savegame names are saved separately, if you delete a save file, it would still be displayed on the load screen.

    So, is there a way to save the save game name in the first array and basically in those save files as well, and then still being able to display all save game names at once?

    Also, I couldn't find a way to delete files from within MMF yet, but deleting your saved games seems quite essential to me. I couldn't find anything about it anywhere though.

    Thanks for all help in advance.

  2. #2
    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)

    Re: Saving - multiple saves and deleting saves

    Do you have a limited number of save slots? If so, you could just set up blank saves and never have to bother with deleting them... You'd just update the info for each save file (including the name of the save to display in the list) and when you want to remove a save in your game, it would just set that save file back to a blank slate with default name of "save slot #" or whatever...

    Not sure why you're using two arrays.

    You might be complicating things more than you need.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module
    FGRaptor's Avatar
    Join Date
    Aug 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Saving - multiple saves and deleting saves

    Basically because the tutorial used two. I was thinking about making it into one, I just wasn't sure if it would work. Although I think I might have an idea. Setting it to blank would work I guess, I just thought deleting the files would be cleaner. Although they won't take up infinite space I guess.

    The slots are limited by the way, yes.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module
    FGRaptor's Avatar
    Join Date
    Aug 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Saving - multiple saves and deleting saves

    Okay, I can't really figure it out and I can't find any articles or anything on this that would help me.

    To explain again.

    I have 5 save slots and a save and a load screen. In the save screen you have 5 edit boxes. You can enter a savegame name in there.
    In the load screen you have strings, that display all the savegame names.

    Now, at the moment one array saves the game data into the savegame files (1 to 5) and one array saves another file with all the savegame names, no matter which slot you save in. Upon start of frame this file is loaded to set all the savegame names in the save or load screen to the names you have chosen.

    However, if I would delete a savegame (physically), the names would still be displayed, but fail to load.

    Now this makes a total of 6 files.

    1: How would I delete a savegame? When name=delete then delete data in array? Something like that? Is there no way to just physically delete the file from within mmf and also check if files exist?

    2: How would I not have the names saved in a separate file, but still be able to load all the names? I don't see a way without a separate file at the moment.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Saving - multiple saves and deleting saves

    The File object should be able to delete file. When you create the list of games to load, you can also use it to check for the existence of the file for that slot (I assume that they have names that you'll know in advance) and only display the name for that slot if the file exists.

    To solve your name problem, you could make space in your save arrays for the name of the save file, and just read it out of the array if that file exists instead of referring to a separate file.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module
    FGRaptor's Avatar
    Join Date
    Aug 2011
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Saving - multiple saves and deleting saves

    Using the file extension I got it work, thanks. I'm glad someone pointed me in that direction. It works fine now with just one array and I can delete the files just fine. Thanks again.

Similar Threads

  1. Question about INI saves - testing vs release of game
    By GameMaker2019 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 9th February 2013, 09:41 PM
  2. Problem with saves
    By Marek in forum The Games Factory 2 - Technical Support
    Replies: 8
    Last Post: 2nd June 2009, 11:26 PM
  3. RPG saves help
    By Megaman in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 10th December 2008, 09:18 PM
  4. Image Manipulator Saves Blank Picture?
    By LB in forum File Archive
    Replies: 3
    Last Post: 1st November 2008, 03:56 PM
  5. Login System-Saves all data to an array file
    By Brandon in forum File Archive
    Replies: 34
    Last Post: 26th November 2007, 05:05 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
  •