Announcement

Collapse
No announcement yet.

[PLUGIN] Savior 2

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [SUPPORT] [PLUGIN] Savior 2

    [NOTE]: If you need help with Savior 1.x plugins, please post here: //forums.unrealengine.com/plugin-auto-save-game

    What is "Savior 2":

    This is a major update for the "Auto-Save Game" system I've been maintaining up on Unreal Marketplace for last couple years.

    Focused on performance and data reach, I've totally scrapped original code and wrote this version from scratch, implementing a fully custom serialization engine that made possible for me to achieve the goal of moving away from the built-in 'FArchive' system and it's ' << ' operator constraints. The reasons why I moved away from the internal FArchive operator are many, so I won't go too much into details about this... Instead, let me throw at screen the new 'features' for you:
    • Savior 2 is tens of times faster than Savior 1.x releases.
    • Multi-Threaded Save & Load capabilities, no freezes or hiccups.
    • Save all data from outside your Game's main thread, even Actor References.
    • Save any class. Any UObject is now supported, not just Actors or Components.
    • Versioning. Your Game will be capable of loading from old '*.SAV' files after patches.
    • Encryption. All data goes through a lightweight, fast, multi-platform compatible encryption pass.
    • Optimized: Savior 2 is designed to predict and avoid crashes at all costs, no matter how complex Levels are.
    • Optimized: NO Components needed to be attached anywhere thus no memory eaten for the sake of storing data.
    • Optimized: NO destructive workflow. Existing Actors aren't destroyed/replaced, keeping references alive and safe.
    • Optimized: NO containers created when saving game data thus no big chunks of memory garbage generated.
    • Optimized: Savior 2 Slots are UObjects, not Actor nor Component, avoiding large resource allocations.
    • Automatic Level Transitions on Load from Slot.
    • Threaded Save & Load the whole Game World or individual Actors.
    • Threaded Save & Load Game Mode in real-time, independent of Level.
    • Threaded Save & Load Streamed Levels without pausing the Gameplay.
    • Threaded Save & Load all Properties marked 'Save Game', no C++ required.
    • Threaded Save & Load any Dynamically-Created Classes of Actors and Components spawned in Runtime.
    • Threaded Save & Load Actor's Scale, Location and Rotation, Linear and Angular Velocity automatically.
    • Threaded Save & Load Actor's Visibility state, Collectibles' or Particle Systems' state automatically.
    • Optional Built-in HUD Class with auto generated Load-Screens with Blur, Splash-Screens or Videos.
    • Optional Built-in Progress Bar System with auto generated UI Elements for your Loadscreens.
    • Optional Built-in Slot Widgets with auto generated UI Slot Elements for your HUD Menus.
    • Optional Built-in support for Slot UI Thumbnails and UI/UX Decorators.

    .
    An intuitive Slot System for Save & Load:





    .
    Easier than Previous Workflow with Slot Assets:




    .
    Threaded World Save & Load for Performance Boost:




    .
    Simplified Resolution of ID Conflicts when Loading Multiple Instances of Streamed Levels:




    .
    Automatic Restore of Objects Spawned in Runtime:




    .
    Built-In Load Screens System:






    .
    [DEMO PROJECTS]:
    Last edited by BrUnO XaVIeR; 11-22-2018, 12:54 AM.
    | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

    #2
    [API REFERENCE]
    Savior II Class:


    Save Game World:


    Saves the whole Game World to Slot.
    Automatically calls 'Write Slot to File' function.

    Save Game World [+Callbacks]:

    Saves the whole Game World to Slot.
    Automatically calls 'Write Slot to File' function.
    @BeganSaveCallback: Custom Delegate Event called when Save begins.
    @FinishedSaveCallback: Custom Delegate Event called when Save completed.

    Save Game Mode:

    Saves Game Mode Classes to Slot.
    Automatically calls 'Write Slot to File' function.

    Save Game Mode [+Callbacks]:

    Saves Game Mode Classes to Slot.
    Automatically calls 'Write Slot to File' function.
    @BeganSaveCallback: Custom Delegate Event called when Save begins.
    @FinishedSaveCallback: Custom Delegate Event called when Save completed.

    Save Level:

    Saves the whole target Level to Slot.
    Automatically calls 'Write Slot to File' function.
    @LevelToSave: The Level Map to be serialized from World.

    Save Level [+Callbacks]:

    Saves the whole target Level to Slot.
    Automatically calls 'Write Slot to File' function.
    @LevelToSave: The Level Map to be serialized from World.
    @BeganSaveCallback: Custom Delegate Event called when Save begins.
    @FinishedSaveCallback: Custom Delegate Event called when Save completed.

    Save Game Instance:

    Saves Game Instance Class to Slot.
    Automatically calls 'Write Slot to File' function.

    Save Game Instance [+Callbacks]:

    Saves Game Instance Class to Slot.
    Automatically calls 'Write Slot to File' function.
    @BeganSaveCallback: Custom Delegate Event called when Save begins.
    @FinishedSaveCallback: Custom Delegate Event called when Save completed.

    Load Game World:

    Loads the whole Game World from Slot.
    Automatically calls 'Read Slot from File' function.
    Supports respawn of dynamically created Actors & Components.

    Load Game World [+Callbacks]:

    Loads the whole Game World from Slot.
    Automatically calls 'Read Slot from File' function.
    Supports respawn of dynamically created Actors & Components.
    @BeganLoadCallback: Custom Delegate Event called when Load begins.
    @FinishedLoadCallback: Custom Delegate Event called when Load completed.

    Load Game Mode:

    Loads Game Mode Classes from Slot.
    Dynamically created Objects will NOT auto respawn.
    Automatically calls 'Read Slot from File' function.

    Load Game Mode [+Callbacks]:

    Loads Game Mode Classes from Slot.
    Dynamically created Objects will NOT auto respawn.
    Automatically calls 'Read Slot from File' function.
    @BeganLoadCallback: Custom Delegate Event called when Load begins.
    @FinishedLoadCallback: Custom Delegate Event called when Load completed.

    Load Level:

    Loads the whole target Level to Slot.
    Dynamically created Objects will NOT auto respawn.
    Automatically calls 'Read Slot from File' function.
    @LevelToLoad: The Level Map to be deserialized to World.

    Load Level [+Callbacks]:

    Loads the whole target Level to Slot.
    Dynamically created Objects will NOT auto respawn.
    Automatically calls 'Read Slot from File' function.
    @LevelToLoad: The Level Map to be deserialized to World.
    @BeganLoadCallback: Custom Delegate Event called when Load begins.
    @FinishedLoadCallback: Custom Delegate Event called when Load completed.

    Load Game Instance:

    Loads the Game Instance from Slot.
    Dynamically created Objects will NOT auto respawn.
    Automatically calls 'Read Slot from File' function.

    Load Game Instance [+Callbacks]:

    Loads Game Instance from Slot.
    Dynamically created Objects will NOT auto respawn.
    Automatically calls 'Read Slot from File' function.
    @BeganLoadCallback: Custom Delegate Event called when Load begins.
    @FinishedLoadCallback: Custom Delegate Event called when Load completed.

    Save Object:

    Saves to Slot all Properties marked 'SaveGame' of Target Object.
    This is NOT a call to 'Write Slot to File' function, call it manually.
    @Object: Object Reference Properties are read from.

    Save Component:

    Saves to Slot all Properties marked 'SaveGame' of Target Component.
    This is NOT a call to 'Write Slot to File' function, call it manually.
    @Component: Object Reference Properties are read from.

    Save Actor:

    Saves to Slot all Properties marked 'SaveGame' of Target Actor.
    This is NOT a call to 'Write Slot to File' function, call it manually.
    @Actor: Object Reference Properties are read from.

    Load Object:

    Loads from Slot all Properties marked 'SaveGame' of Target Object.
    This is NOT a call to 'Read Slot from File' function, call it manually.
    @Object: Object Reference loaded Properties are written to.

    Load Component:

    Loads from Slot all Properties marked 'SaveGame' of Target Component.
    This is NOT a call to 'Read Slot from File' function, call it manually.
    @Component: Object Reference loaded Properties are written to.

    Load Actor:

    Loads from Slot all Properties marked 'SaveGame' of Target Actor.
    This is NOT a call to 'Read Slot from File' function, call it manually.
    @Actor: Object Reference loaded Properties are written to.

    .
    Additional Reference:

    Full List of Savior's Blueprint Functions
    Last edited by BrUnO XaVIeR; 04-26-2018, 12:15 PM.
    | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

    Comment


      #3

      How to Setup a Slot:

      As always, create a Slot Asset on Asset Browser;
      Opening the Asset you can quickly adjust default Properties such as Default Player Name, Levels Thumbnails, etc:




      Last edited by BrUnO XaVIeR; 05-04-2018, 01:35 PM.
      | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

      Comment


        #4

        How to Save & Load from any Slot Asset:

        All you have to do is right click any graph on any of your Blueprints and search from one of main nodes in "Savior 2" section.
        These main Save/Load functions automatically creates a runtime instance of a Slot object for you... So you don't have to instantiate anything, just reference the Slot Asset and let the node work:





        From any UMG Widget you simply setup your "On Button Clicked" events to call one of these "Savior 2" functions.
        It's THAT simple, everything in scope marked 'SaveGame' tag will save or load:

        Last edited by BrUnO XaVIeR; 05-04-2018, 01:53 PM.
        | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

        Comment


          #5

          How to Setup Pickups to Auto-Destroy on Load:
          [Savior 2.0.6+ is required for this setup]


          Any Actor you wish to remember it was destroyed and should not respawn on Level load, you have to add a "Destroyed" Boolean Property to it. And mark it 'Save Game' tag as well:



          The Property must be a Boolean named "Destroyed", case sensitive.
          The Property must be marked 'Save Game' tag.



          Then in your Blueprint Graph, create a new Function calling it whatever you'd like, this Function will be a substitute of "Destroy Actor" node for the Game.
          Inside this Graph Function set the value of "Destroyed" to true, but don't destroy this Actor before you save the Game, maybe hide it instead:




          Having that Boolean "Destroyed" Property set to TRUE will tell the Plugin that this Actor must destroy itself once the Level was loaded, making it be gone the next time a Player visits that Level...



          To do that, when you want a Pickup to be destroyed, simply call your newly created Function that hides the Actor and sets "Destroyed" to True instead of destroying the Actor with a Destroy node:





          Once the Game is saved, the Plugin will Destroy the Actor after it's "Destroyed" Property has been recorded, so the Actor won't be left there consuming memory.
          Last edited by BrUnO XaVIeR; 05-08-2018, 05:33 AM.
          | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

          Comment


            #6

            How to Setup Procedural Actors Spawned at Runtime to Auto Save & Load:


            An Actor, or Component, you are spawning at Runtime will be saved as usual.
            However loading them back is a complex task because we cannot control whatever ID the internal engine will assign to a runtime spawned Object.
            Often the new Object's ID will be random internal pointer that used to reference another object; to overcome this obstacle to Save & Load "Procedural Actor" properly, your Procedural Class is required to implement three things:
            • Implement the "SAVIOR_Procedural" Function Interface.
            • Include a "Guid" Property to its Variables List, named "SGUID".
            • In its Construction Script, call a special node called "Create Once: SGUID".
            Those three simple steps above will guarantee your Procedural Class will be loaded correctly from Slot's Data without mismatching Data with another instance of your Class also spawned in Runtime, turning them into Absolutely Identifiable Procedural Objects. So...

            First, within desired Procedural Actor's Blueprint, we have to implement our "Procedural" Function Interface:




            Once we have that Blueprint Interface in place, we now have to make sure the Class will process the Data when it is received from Savior's multi-threaded serializer. The "Load Actor" node (would be "Load Component" for a Procedural Component) will run the 'Code Reflection' system to restore Property Values:



            Once that is done, we now have to create a "Guid" Property for the Procedural Class and name it "SGUID":



            The Property must be a Guid Struct named "SGUID". Savior will 'read' the Property and expects it to be this type, otherwise it will be ignored.
            The Property must be marked 'Save Game' tag to be visible to the Auto-Save System.

            That been done, only step left now is making sure SGUID's value is persistent and unique.
            That would be a headache for you to do, so instead of trying to control its behavior, there's a node that can do that for you within a Construction Script...

            Add the "Create Once: SGUID" node to your Construction Script Graph and assign its output value to the "SGUID" Property:




            Do NOT use a default "New Guid" node! The Guids created by that aren't persistent, it would break our logic.

            And it's done, your 'Procedural Class' is ready to be freely spawned in Runtime and be automatically respawned with it's correct Property's values restored once the Game is reloaded from a Slot.
            Last edited by BrUnO XaVIeR; 05-09-2018, 06:33 AM.
            | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

            Comment


              #7

              How to Use Tags as Command Parsers for Save/Load Functions in C++ Domain:


              You can customize Serialization of certain characteristics of your Class with Savior without typing code; using simple "Tag" commands.
              A little more in-depth explanation can be found here:

              https://forums.unrealengine.com/unre...005#post828005


              With a few String Tags you can configure your Class to opt-out of specific data that would otherwise be serialized in "Save World/Level" functions:






              Just apply the Tag you see fit your Design to your "Actor Tags" or "Component Tags" list, like the example below:

              Last edited by BrUnO XaVIeR; 06-05-2018, 08:31 AM.
              | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

              Comment


                #8
                Reserved for FAQs.
                | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

                Comment


                  #9
                  2.0.5 is now merged with 1.x plugin package, you can download and have both plugins installed to Unreal Engine from this same download
                  | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

                  Comment


                    #10
                    .
                    [DEMO PROJECTS]:


                    Demo Project 4.18 don't work with this error:
                    Attached Files

                    Comment


                      #11
                      It's a demo project.
                      The plugin is obviously NOT included.

                      Please remove second post or wrap it in a /code tag.
                      It pollutes the forums and makes the page hard to read.
                      | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

                      Comment


                        #12
                        hey there BrUnO XaVIeR , we're just creating a SaveState/LoadState function on our game. Maybe we will be better off focusing on other things and getting your plugin, because frankly with all the projects i have to code right now and managing our artists and assets, time is really falling short on my behalf, and i have to start thinking that, even if i want to code everything by myself, i have other critical areas that i need to attend.

                        Will give it a try once it's on the marketplace, will mostly use it for generating checkpoints in stages, i assume that's supported.

                        Good job as always, always pleased to see your content. Experienced programmers are a joy to find.

                        Comment


                          #13
                          Originally posted by HeavyBullets View Post
                          hey there BrUnO XaVIeR , we're just creating a SaveState/LoadState function on our game. Maybe we will be better off focusing on other things and getting your plugin, because frankly with all the projects i have to code right now and managing our artists and assets, time is really falling short on my behalf, and i have to start thinking that, even if i want to code everything by myself, i have other critical areas that i need to attend.

                          Will give it a try once it's on the marketplace, will mostly use it for generating checkpoints in stages, i assume that's supported.

                          Good job as always, always pleased to see your content. Experienced programmers are a joy to find.
                          Thank you, this is already on Marketplace; but I can mail you a precompiled version if your team have to try it out first.

                          I don't have files here, but if you pm me an email I forward to you when I'm back home.
                          | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

                          Comment


                            #14
                            Originally posted by BrUnO XaVIeR View Post
                            It's a demo project.
                            The plugin is obviously NOT included.

                            Please remove second post or wrap it in a /code tag.
                            It pollutes the forums and makes the page hard to read.
                            Have a compiled version .EXE to test???

                            Comment


                              #15
                              Originally posted by Demonraz View Post

                              Have a compiled version .EXE to test???
                              No, thanks for removing the logs (too long post).

                              ​​​​​Pm me an email and when I'm home I can send you a pre-compiled plugin for you to test and see if it fits your project (source code won't be included).

                              Remember to note me which Unreal Engine version you use.
                              | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

                              Comment

                              Working...
                              X