User Tag List

Results 1 to 10 of 10

Thread: The best method of a save system for a game on one large frame?

  1. #1
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    The best method of a save system for a game on one large frame?

    This has been eating away at me for a while, but I have a game where everything happens on one giant frame. This includes a TON of active objects like dirt and etc. you can break, items laying on the ground, and etc. This was never made with a savefile in mind originally but I'd really like to make one for it now if possible.

    Nothing is set up in an array or anything, everything has been placed there by me during the design phase and then the player can interact with stuff (or destroy things, or drop items on the ground) while playing.

    I mean would I have to do a ton of loops during a save event like For Loop "BLAH" = (# of active dirt squares) , write the X / Y position of each dirt square and so on?

    I really wish there was an object that somehow took a snapshot of the frame in its current state while playing, and saved all of that into one file.
    Damn that would be nice, wouldn't it?

    Thanks for any help you can provide!

  2. #2
    Clicker Fusion 2.5Android Export Module

    Join Date
    Sep 2010
    Posts
    539
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Sorry if you got your hopes up when you saw a response in this thread I just wanted to second that idea with saving. I was just thinking about that yesterday. How great it would be to have an easy save object. Either like you suggest, a savestate (Save frame position is too buggy, tried it with my game and it crashed immediately haha) One other way, if possible could be that you would attach/add the objects/values that you want to save. Maybe you only want 20 global values saved for example and not all of them plus 10 alterable values from your player character, so then you could just tell the object to save those specific values. in a non editable file. That would be awesome. I didn't have much luck with the blowfish extension so i did my own little encryption system. It's not bulletproof of course but it will hopefully cause people a severe headache trying to crack it haha.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,117
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    You would really want to use an array.. to place and to save/load the object positions/states.

    I've never used the "Save Frame Position" function, does that help?

    Edit. I made an easy to integrate save system, but it won't be that useful for your purposes dealing with so many objects.
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, I'll try the save frame position and see if that will work first.

  5. #5
    Clicker Fusion 2.5Android Export Module

    Join Date
    Sep 2010
    Posts
    539
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I think save frame position is ok for smaller games but with my rpg where i have a ####load of values both global and alterables i got an immediate crash, which i sort of suspected. I just wanted to try it :-D

    The function itself is great but not very stable. If they could make it more reliable i would use it all the time. Maybe it will work better in a one frame game though

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I second the need for at least some more documentation on the "Save Frame" function

    I was unable to find informations around,
    not searched that much, but Fusion's manual is a bit lacking in this specific department:

    Frame position
    The Frame Position actions allow you to save and restore the position of a frame or an application.

    • Save frame position asks for a file name. It saves the current frame position in the file.
    • Load application position asks for a filename. It restores the application as it was when it was changed. The current frame may be changed.
    • Load frame position asks for a filename. It restores the current frame as it was when saved.


    ?
    What exactly does it saves?

    Would be nice having chance of saving full "snapshots" of the application status, as Del Duio, Klownzilla and other users often suggest.
    Maybe in F3?

    @ DelDuio: in your specific situation, IF the game is windows only (due to the "create by name" extension), I would do this:

    1) add all objects you need to save values of to the same qualifier
    2) plug in the "create by name" extension: it has the awesome magic power of giving you an object's "name" from its fixed value
    so with that you can: fire a foreach loop through all your "qualified" objects, retrieve their name and write it in the array, along with all the relevant data for that entry
    i.e.:
    ugly_monster | 124 ( X ) | 223 ( Y )| 12 (hp) | etc.
    3) use a loop for global values/strings as well, as DaveC suggests

    So with just a couple loops you have everything you need covered, without additional hard-coding

    Then upon loading, fire a loop in three "phases":

    a) retrieve all global values/strings and set them
    b) "create by name" and place objects you have saved, fire a nested loop for each one of them >>>
    c) set their values/dtrings to the data you have saved

  7. #7
    Clicker Fusion 2.5Android Export Module

    Join Date
    Sep 2010
    Posts
    539
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What I understand is that the save frame function saves the entire application. every global value,every object position (Even moving objects) and their alt. values etc. It pretty much works as a save state function. It is crash-prone though for reasons unknown to me. so it's not really a safe method. Now isn't that ironic? Not safe to use the save function

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This video goes over the save frame stuff pretty well

    https://www.youtube.com/watch?v=LqG6Hp6friY

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Thank you RhysD, interesting video by AZT,
    I never really used that option and made my own system,
    but maybe this could have saved some time!

    So it does indeed a snapshot of (almost) the whole thing.

    Though it seems to have some little disadvantages to take in consideration,
    and maybe that's what Klownzilla and other users experienced, and led to crashes.

    Something worth experimenting in the future..

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    True, I usually use an array to do saving stuff. It is pretty annoying having to keep track of ID's though. Fusion really needs a dictionary storage option (if there isn't already an extension for that )

Similar Threads

  1. Replies: 0
    Last Post: 20th March 2016, 08:47 PM
  2. Best method of 'Book-Keeping' large amounts of text?
    By Catastrophic in forum Fusion 2.5
    Replies: 2
    Last Post: 18th April 2015, 11:57 PM
  3. Need help with a save system in my game
    By Nicechill_Nyro in forum Fusion 2.5
    Replies: 2
    Last Post: 18th April 2015, 07:22 PM
  4. How to make save system for flash game?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd September 2011, 08:47 PM
  5. whats the best method to save info+pass it on
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th February 2010, 03:14 PM

Posting Permissions

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