"Save/Load Frame position" details?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello!


    I was hoping for clarification on a feature I have been using. I had planned on making a save-game system using an array in my project. It would be rather fairly straightforward but also quite time consuming!

    Then I discovered "save frame position" and "load frame position" (also "load application position). I had not considered this before since I just thought it saved objects positions on the screen and nothing else. I was mistaken though and it seems to work quite well for basically zero effort - it seems to load everything but backdrops, but since it's tile based game I just run the tile placement function on load and everything seems to be fine and exactly as I left it! I had some questions though:

    1 - What is the difference between "load application position" and "load frame position"?

    2 - loading a previous savestate file after making edits to the project gives an error message about the file being for a previous version of the application. I understand why, but will this break people's save games if I update the game, for instance? is there a way to silence the error?

    3 - What data/objects does "save frame position" encompass when it saves the state to a file? I can't find much info online except that it doesn't cover third party extensions (which is fine, my project basically only uses default extensions except string parser)

    So far it seems to be working perfectly, but I don't want to miss some super important gotcha down the road

    Cheers!

  • When you call save & load frame position, fusion will call this routine for each objects. And if an extension doesn't implement this routine you will get various issues depend on how you use it. So build your own system is not evitable, unless you only use built in objects and opensource objects. Some extension may make this easier, I made some features that can let you save all alterable values then restore it by one click. But i never used it, this will bundle binary to base64 and hide issues when you trying to debug.

    And about the save file break, this will also happen, depend on how your save system is designed. My game only saves the state and offset of script, so if script is changed the save file is not usable, you know, dangling pointers. It's hard to make it still compatible if you make big changes, even if it build by yourself.

    Like the edit data of fusion extensions, there's an update routine, you need to handle update of each version, this will also happen to save files if there are significant changes.

  • Hey thank you for the reply

    So, I should be fine I think, since I don't use any third party extensions. I will have to do some testing with the loading of a files from a previous version, though..

    Assuming no third party extensions or anything, is there anything you know of that it won't cover?


    thanks

  • OK, trying to answer:

    1. Load App Position just does load frame position and then jumps to the saved frame.

    2. "will this break people's save games if I update the game?": they will be able to save games, but they won't be able to load previously saved games.
    " is there a way to silence the error?" -> no.

    3. IIRC it saves data for all built-in objects except physics objects.

    Also something to add, it's supported only by the Windows runtime.

  • Hey thanks for this reply. Are there any plans to have it work on other runtimes?

  • And I can imagine why this...
    People don't know exactly how it works, but for an extension to be "savable", it requires the author to program that part.
    The Save/Load action from within the editor doesn't do it all alone...
    Sure Clickteam could implement that for their most common extensions, but would that be worth it?
    This action does not work if you change anything at all on your app, and mobile usually gets updates much more frequently, so other than something to be used only temporarily, it wouldn't be that useful.
    For stuff like this, the best way is to use something like Array or even INI, saving only the necessary stuff to load again, wouldn't have the same limitations.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!