Creating the ultimate save system - Unreal Engine 5

Поділитися
Вставка
  • Опубліковано 19 лют 2024
  • In this tutorial we will be creating a very powerful and easy to use save system.
    Let's create systems playlist: • Let's create a game sy...
    Join the Discord server here: / discord
    Support the work of LeafBranchGames on Patreon here: / leafbranchgames

КОМЕНТАРІ • 203

  • @Louieeeee
    @Louieeeee 3 місяці тому +19

    Getting a straight up full tutorial on creating a well-designed and upgradable save system is crazy.

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +7

      I see a lot that people have difficulty turning the basic tutorials on save system into actual working systems. So I thought this would be very useful for many game devs.

    • @SkulkDemon
      @SkulkDemon 29 днів тому +1

      @@LeafBranchGames it was a complement

    • @LeafBranchGames
      @LeafBranchGames  29 днів тому

      @@SkulkDemon I know.

  • @ryanjdevlin87
    @ryanjdevlin87 2 місяці тому +9

    I've watched this tutorial about 10 times since you posted it. Not only is this a great way to create a save system it also shows the best way to implement any manager class! So much good stuff in here thank you so much !

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому +4

      Thank you very much, both for the kind words and also the generous support. :)

  • @DARK_Games_Bruno
    @DARK_Games_Bruno 18 днів тому +2

    No começo do vídeo fiquei pensando será que não só mais um tutorial de como salvar o jogo, e vou te falar eu tentei algumas formas de fazer o salvamento do jogo seguindo alguns tutoriais no youtube, e realmente foi como você disse, somente esse seu vídeo funcionou no meu projeto, e não somente isso, me fez entender como funciona a lógica por trás de tla forma que sai configurando tudo que preciso salvar sem dificuldade alguma. Muito Obrigado.

  • @lolaswift111
    @lolaswift111 2 місяці тому +5

    Tutorials which accomplish a sub system like these are insanely valuable for beginners and certainly greatly appreciated!

  • @tldmbruno
    @tldmbruno 3 місяці тому +2

    Incredible video. Instant like and added to my playlist.

  • @dzmitryyafimau7647
    @dzmitryyafimau7647 3 місяці тому +1

    Simply amazing! Great job!

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +1

      Thank you!

    • @dzmitryyafimau7647
      @dzmitryyafimau7647 2 місяці тому

      @@LeafBranchGames Played with that system for a while and ran into a few dead ends. Trying to resolve them myself but it would be nice to see a follow-up on this topic from you since the first iteration is very well-structured and works like a charm. The issues I'm referring to in particular are when multiple actors in a level need to save and load their respective data, how would you tell which actor gets what data? Furthermore, suppose we are talking about collectible items. How does one manage data saving if some of them were manually placed in a level but others could be spawned by dropping from the inventory and any of those could be picked up later as well? Clearly, we need to store a map with references to actors as keys, but the realization is quite complicated.

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому +1

      @@dzmitryyafimau7647I would suggest you create a manager to handle saving and loading those objects. If they are placed objects in the world, I would suggest using GUIDs to keep track of the unique objects.

  • @lbv7
    @lbv7 Місяць тому +1

    This was incredibly helpful. Probably the best tutorial that made 50min go incredibly fast. Thank you so so much, this is magnificent.

  • @revraitah
    @revraitah 2 місяці тому +1

    Awesome tutorial, keep it up!

  • @STWizzard
    @STWizzard 26 днів тому +1

    Thank you very much for the video!
    Now I have a cool save system!

  • @dwain.d
    @dwain.d 3 місяці тому +3

    This is great and very timely, thank you. Too many tutorials only show how to save an individual variable or something which isn't wrong but not practical or scalable. I have a project in proof of concept phase still and realised the save system has to be baked in very early and to be honest started to seem quite daunting. This video is brilliant and it was great to know I was on the right track already but this way is simpler and more scalable than what I currently have. Thanks so much for this.

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +1

      Glad to hear it could be helpful for your project!

  • @animatrocities
    @animatrocities 3 місяці тому +1

    You are a life saver for this!!

  • @majule1
    @majule1 2 місяці тому +4

    Great tutorial as always! I would add my voice to a request for a part 2 with movable/destructible items and a manager for these. Say a sword which can be picked up in level 1 and dropped in level 3 or even characters which can killed or not and stay dead if you return to the level.

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому +4

      I will add it to my to do list.

    • @masterblastr
      @masterblastr Місяць тому

      This please! I'm trying to wrap my head around how to go about creating an observer/manager that will keep track of items that have been picked up but in a scalable way. I'm confused as to how to allow the designer to place objects in the scene and then have them not be loaded again later upon being picked up without a huge monolithic tmap or array of every item on the Save Game Object. And then to have the items level specific as well.

    • @timnekk7706
      @timnekk7706 Місяць тому

      @@LeafBranchGames This would be awesome. I enjoy your save system so much!

  • @GoatOfTheWoods
    @GoatOfTheWoods 3 місяці тому +1

    Excellent !

  • @2loffa2
    @2loffa2 3 місяці тому +1

    Thanks a lot man!

  • @420kushan
    @420kushan 2 місяці тому +2

    From the video it is easy to understand how the system works. Great job. But to be able to invent systems like this... I would feel like a genius. I wish I could be at your level, or at least half of it :D

    • @420kushan
      @420kushan 2 місяці тому

      I should quit smoking weed lol

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому +2

      All it takes is time and dedication, anyone can do it if they put in the work.

  • @admazzola3569
    @admazzola3569 20 днів тому

    to be honest building a save system in a typed language like Rust is much preferred to doing it in Blueprints once you get a more complex game. But this is really cool for simple games !

  • @herbi467
    @herbi467 Місяць тому +2

    Dude my saving system turned into a shitstorm. Decided to use this instead and its crazy how simple and powerful this is. Thank you so much.

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому +1

      You are welcome, glad to hear it was useful to you! Good luck with your project!

  • @AleksanderFimreite
    @AleksanderFimreite 18 днів тому +2

    What you are doing at 42:00 I suggest you just move that loop to the same location that the actor list is processed.
    This will avoid needing to implement "system behaviour component responsibility" on individual actors.
    I can recommend replacing individual values of serialized data with a struct.
    That way, if you need to save Copper as well, you only need to add another variable to the struct. At least for larger objects with a lot of data.
    One major topic that was not covered, I would like to see how this system deal with multiple instance data?
    In that you have 4 enemies of the same type (blueprint). How can you save "one is damaged, one is dead, two are still default"?
    My approach would probably be to look at having each actor implement a unique key based on ActorId. (Actor->GetObjectName)
    To then look up a variable Map(String, Struct) from the SaveGame object which it can use to find a specific key aka. (Enemy_1, Enemy_2, etc...)
    On another note, if you are looking for a node formatter to help speed up placement of nodes, I really recommend "Blueprint Assist".
    It has saved me of countless perfectionist hours almost on a daily basis.

    • @LeafBranchGames
      @LeafBranchGames  18 днів тому +1

      Yes, you could leverage the part of component save/load to not be the responsibility of the actor. That is not a bad idea.
      Concerning variable data storage - yes, naturally you will be storing information in structs/arrays/etc as the information becomes more complex. The examples were simply examples to keep things simple to understand.
      Multiple instance data would depend. It could be handled by a manager class or by unique actors. It all depends on how the game, levels, actors are meant to behave and spawn. I would opt for a GUID over an actor id in most cases.
      Thanks for the tip on the blueprint assist. I have considered getting something to keep things cleaner, but I am leaning towards electronic nodes.

    • @AleksanderFimreite
      @AleksanderFimreite 17 днів тому

      @@LeafBranchGames I can understand your argument about GUID, as two actors with the same ActorId from different levels would possibly intersect?
      To my understanding, unreal does not have a proper GUID by defualt though. And you would need some plugin for it? I recall there being some hassle there when I looked into it.
      My workaround was to include level name in the key. Which would make it highly unlikely that they ever have a conflict.
      If you have some useful info on GUID I would love to hear that.

    • @LeafBranchGames
      @LeafBranchGames  17 днів тому

      @@AleksanderFimreite I suppose that depends what you mean by proper GUID. But no, you don't need a plugin. There is a "new guid" node you can use.

    • @AleksanderFimreite
      @AleksanderFimreite 17 днів тому

      ​@@LeafBranchGames What I meant by GUID is a key that stays the same from the moment the actor is placed in a level. This does not seem to be the case for a guid, as it makes a new one on the fly each time it is called. Also found this comment about it on reddit claiming that it is Editor Only, and not available in shipping builds. This property is a must have for a save system to recognize it as the same actor.

    • @LeafBranchGames
      @LeafBranchGames  17 днів тому

      @@AleksanderFimreite I would not trust a random comment on reddit. I would verify that claim myself, because that sounds very dubious.

  • @IGiveTheBestTakes
    @IGiveTheBestTakes 2 місяці тому +2

    I love this tutorial. Every other "save system" on youtube is like INCREDIBLY basic to the point that literally no game would use it at scale lol It also over relies on making a monolithic player blueprint. This is just the right amount of advanced that its useful for intermediates and modular that its something people would actually use. Its very hard finding stuff that isnt "so you just started learning game development!" or "here is how you from scratch re create unreals real time ray tracing system!" lol

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому +1

      Glad to hear you like it! These take a lot of time and care to try and get both informative, easy to use as well as being actually useful.

    • @IGiveTheBestTakes
      @IGiveTheBestTakes 2 місяці тому

      @@LeafBranchGames This one definitely hit all of them! I especially always like seeing using interfaces and events. They are so powerful but almost never used in videos. I didnt even know the use cases for these for a good portion when I was a beginner xd

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      @@IGiveTheBestTakes Yes. As a beginner it is impossible to distinguish between good or bad practice and the cost of doing someing easy now that will make it harder later and the other way around.

  • @LimitedPerfection
    @LimitedPerfection 3 місяці тому +1

    LBG upgrading his production quality. Very nice synopsis at the beginning.

  • @GAMINGWITHSHANMUKH
    @GAMINGWITHSHANMUKH 2 місяці тому +1

    Hey mate AWESOME video !!! ❤
    Could you please make a player skill unlocking system 😢

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому +1

      Thank you! You may want to watch the Create an RPG series I have then. Most parts for such a system is done there.

  • @wardredd6394
    @wardredd6394 2 місяці тому +2

    Hello this has been a yet again another wonderful video.. I do have a question how would you add save slots to this system?

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      It is just a matter of replacing the name for the save slot value. So it would very much depend on what type of save slot system you were creating. Since there are very many different approaches to how you could make use of slots. Most of the save system doesn't care what slot is used, only the actual events that interact with the file on disc.

    • @wardredd6394
      @wardredd6394 2 місяці тому

      if you ever do a follow up I would love to see how you would go about doing it You are such a valued part of this community thank you for all you do and I plan to show some support towards your work thank you for everything over the years.@@LeafBranchGames

  • @sebastianavena
    @sebastianavena 3 місяці тому +1

    Thank you, I love your content!
    To make this fully scalable, would be great to be able to add objects that the SaveGame doesn't even know, but the ones that implement the interface do.
    So SaveGame will have data in the form of objects with an identifier, and then, when loading, the objects will search for that data and fill themselves. This way we don't need to add each variable to the SaveGame and it doesn't end up being a big list of variables.
    The way you did is easier to implement, and usable for small - medium projects, I'm just sharing possible ways to make it more scalable :)

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +2

      I would claim this works for larger projects as well.
      It can handle objects it doesn't know of. Gold and silver are just simple examples. But if you want to handle more advanced types you just add structures and arrays.

    • @revraitah
      @revraitah 2 місяці тому

      Hey sorry to butt into your comment, @sebastianavena9919.
      Can you elaborate more on: "be able to add objects that the SaveGame doesn't even know, but the ones that implement the interface do." and "SaveGame will have data in the form of objects with an identifier, and then, when loading, the objects will search for that data and fill themselves. This way we don't need to add each variable to the SaveGame and it doesn't end up being a big list of variables."?
      From my understanding with this tutorial, say I have inherited SaveGame object that will be used for saving that will have a TMap consisting of some sort of FString or an FGameplayTag as key (identifier) that maps to an object as the value of the TMap itself.
      So when you actually need to put value into the inherited SaveGame object, you just have to add it to the TMap with the key value pair ,then when you'd like to 'load' the data from the SaveGame object, you'd simply pass the key to some sort of Load function and if there exist an object with the key, you assign the value retrieved from the SaveGame object. Am I correct? I feel like I might have got the logic wrong as I feel like I still have to 'assign' the retrieved value after I load the SaveGame object to the Saveable object that needs to know the already saved value.
      Thank you!

  • @soldieroscar
    @soldieroscar 21 день тому

    Love the tutorial. Very straight and to the point. In my project my character is able to spawn a ton of different objects, each one with their own properties to save, including its location. I assume that I can just add the Interface to each spawned instance and so they will all become savable when called, and each will fill out their data as requested.
    Question 1: how to save the objects location
    Question 2: does adding the interface to the spawned object mean each spawned object will be spawned back in place?

  • @vadimkrakhmal
    @vadimkrakhmal 2 місяці тому

    Thanks! If i may, it's scalable, but only to a certain extent, say for your character's data. But often you have like hundreds of saveable objects on a level, such as doors you've opened, objects you've moved, triggers you've triggered. Each one of them must save their position/state/whatever else.
    Imagine adding all of those to the BP_SaveGeame as variables, that's a nightmare. So it'd be cool to have some unified data structure/interface and an array of that data types inside of our SaveObejct. So you dont pass in like int Gold, rather ISaveableData Data represinting the values of the concrete object you want to save.

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому +1

      You can.
      Let us take the doors example.
      Add a door manager actor, make it implement saveable interface. It will save and load all the individual door states in an array in the save game.

  • @LuceOut
    @LuceOut 3 місяці тому +1

    Hello, thanks for the amazing tutorials,
    Do you have any video on how to manage animations on different weapons in an fps? I don't know if i am searching for the right video title

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +1

      Not on the specific topic topic like that no. But watching the "create an RPG" series shows off different animations for different classes which may be close to what you are looking for.

  • @jasonwiggin6452
    @jasonwiggin6452 9 годин тому

    Thanks! I too appreciate your tutorial and wanted to say it is both dense and simple and yet powerful. I do have a question though. I'm tracking time and a day count in my game instance but since it's not an object, what would be the best way to do this with your system? Should I move it to another Blueprint?

  • @piquelchips8992
    @piquelchips8992 Місяць тому +4

    Hello, this is a great tutorial, very well made and very helpful. However, I would like to expand it to be able to save a dynamic list of actors each with different properties. In my game I have an Item system where the player can create/delete/craft/... items. This means that the amount of Items and their different properties (each Item has its own properties, like a gun may have damage and ammo whereas a sword could have damage and reach) can be drastically different depending on game sessions and saves. This might also allow for a way to save multiple players in the case of a multiplayer game. Do you have any suggestions as to how to implement this in Unreal Engine 5? Apart from that this tutorial is great. Thank you very much!

    • @admazzola3569
      @admazzola3569 20 днів тому

      multiplayer ??? rebuild the game in a real engine ;D i wouldnt use blueprints for multiplayer. Youll end up in spaghetti hell in 6 months

    • @inspiredexpired9137
      @inspiredexpired9137 15 днів тому

      @@admazzola3569 use uefn for multiplayer style game

  • @kthxbye1132
    @kthxbye1132 Місяць тому

    Thanks so much. How would you tackle a save system for graphic / scalability settings?

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому +1

      Probably as a separate save file, since it is not really relevant for the other save data.

  • @pHaace
    @pHaace Місяць тому +1

    I had an issue for the loading request i think but about to do this again in a new 5.1 project to hopefully have it set up right for expansion into a project

    • @pHaace
      @pHaace Місяць тому

      im pausing for the night on the second time thru this at 36:42 and the continue button doesn't wanna do anything after i try to save a game and not sure where its wrong at

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому +1

      @@pHaace You can add the "does save game exist" to check that the save game you are trying to load first. If it doesn't, then you have not created it. If it does exist, but it doesn't seem to do anything, then you either are not loading things or the values you are trying to load are not correct in the save game structure. Then you need to debug.

  • @GVMuk
    @GVMuk Місяць тому +1

    very nice. having some issues with saving the world state. like say a cargo box location i dropped

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      Try making a manager class to keep track of the actors you are interested in.

  • @9Ouryu9
    @9Ouryu9 28 днів тому

    Woooww awesome!! thanks for the very detail explanation. But i don't know why in my project work with simple variables (like the video) but with strucs don't save the data :( I'm trying to discover why at this moment.

    • @9Ouryu9
      @9Ouryu9 28 днів тому

      well I find that save the struc variables but the problem is for load the character world position and camera rotation. Always set in the game start values...

    • @LeafBranchGames
      @LeafBranchGames  28 днів тому +1

      You can find others having the same issue as you in the comment section.

    • @9Ouryu9
      @9Ouryu9 28 днів тому

      @@LeafBranchGames thanks!!! I find the problem!!! I miss some step jejeje Awasome tutorials!!! Thanks a lot!!!

    • @LeafBranchGames
      @LeafBranchGames  28 днів тому

      @@9Ouryu9 Glad to hear you solved it!

  • @ryanjdevlin87
    @ryanjdevlin87 3 місяці тому

    if im using take his res screenshot for the save game thumbnail, is there away to save the image into the save game data ? Or is it best to save the image separately from the save game data as its own file ? Thank you so much for this tutorial this was amazing ! Im deft going to be overhauling my save system using these fundamentals !

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +1

      I am not sure I am following. You want my thumbnail in your save game?
      Glad to hear the save system was useful to you!

    • @ryanjdevlin87
      @ryanjdevlin87 3 місяці тому

      no im saying that in my save game function im first calling "Take High Res Screenshot node" and saving that to its own file. I havent been able to figure out how to save the image into the save game file itself not as its own file. But im not even sure thats the best route or the image should just be stored outside the save game file. For further clearance im talking about a thumbnail that the player captures at the time he makes a new save game file thats displayed in a load game widget for example.@@LeafBranchGames

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +1

      @@ryanjdevlin87 Gotcha. I don't know since I have not tried that before. I would have to experiment.

  • @IoSkyBoyoI
    @IoSkyBoyoI 19 днів тому +2

    It's clearly a great system. I've rechecked mine twice over a few hours, but mine doesn't work. No errors. Just doesn't save. I'm debugging now. Hopefully if I find anything, ill let people know in case it happens to someone else.
    Edit:
    OK if anyone else has the same issue I have, I was using a widget not an actor. So to get all actors with interface obviously won't work. That needs to be swapped for get all widgets with interface and it works fantastically.

    • @IoSkyBoyoI
      @IoSkyBoyoI День тому

      Ive Made another project using this method and it doesnt work again xD. Urgh for future me...Write it here when you figure it out.

  • @thecynicalsprite1847
    @thecynicalsprite1847 Місяць тому

    Was wondering if i could use this to save certain items as collected. I see this can save totals, my project just has a couple collectibles i want to stay gone after they're picked up.

  • @mykelgaming
    @mykelgaming 2 місяці тому

    great save sys ! if u dont mind explain how can i save player location ? tnx so much

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      You create a vector variable in the save game and save/load that variable from your player on the appropriate events.

    • @mykelgaming
      @mykelgaming 2 місяці тому

      ​@@LeafBranchGames Tnx it worked!!! Ur a legend ❤

  • @STWizzard
    @STWizzard 26 днів тому +1

    Please tell me, do you have a video where you show how to update a player’s HUD when loading a saved game?
    I have a situation where everything is saved, but when loading, the progress bars are not updated.

    • @LeafBranchGames
      @LeafBranchGames  26 днів тому +1

      These are usually two separate things, that shouldn't be in conflict. The UI should just be displaying data, so as long as that saved and loaded data is done right, it should just be a matter of showing it.

    • @STWizzard
      @STWizzard 25 днів тому

      @@LeafBranchGames
      Thanks. I fixed progress bars

    • @LeafBranchGames
      @LeafBranchGames  25 днів тому +1

      @@STWizzard Glad to hear you solved it!

  • @SchriztopherGaming
    @SchriztopherGaming 2 місяці тому +1

    I build this entire system and it all makes sense but when I go to put it to use on the default UE gun, I can't get it to stay with my player through levels if picked up. As soon as I go through my Open Level door and save, then load on begin play of next level blueprint, I still have nothing.
    I was able to get my gun to travel with me with one method using game instance, but I could not fire or spawn the weapons projectile. I've been struggling with this for a couple weeks now. Any further help is greatly appreciated.

    • @SchriztopherGaming
      @SchriztopherGaming 2 місяці тому +1

      Also have this error Blueprint Runtime Error: "Accessed None trying to read property SaveGameRef". Node: Load Data for Requester Graph: EventGraph Function: Execute Ubergraph Game Instance A2B Blueprint: GameInstanceA2B

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      @@SchriztopherGaming This video explains access none: ua-cam.com/video/9PsoeBM82mk/v-deo.html
      You need to save all relevant data that you want to make use of. Before leaving the level, you need to "pack down" all the data in your save in a way that allows you to unpack it in the next level where you load it up again.

  • @OreoCat489
    @OreoCat489 2 місяці тому

    i'm trying to make a trigger when you touch it you save but what block do i use for this? 17:19

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      What do you mean? At any event trigger you want, you can just call the save functionality.

  • @jakespencer917
    @jakespencer917 21 день тому +2

    Nice and flexible. Have it saving my party, location, money and surprisingly...my stats lol.
    Well it was...loaded up today and it is not saving anything again...

    • @LeafBranchGames
      @LeafBranchGames  21 день тому +1

      Good stuff!

    • @soldieroscar
      @soldieroscar 20 днів тому +1

      How do you save the location?

    • @jakespencer917
      @jakespencer917 20 днів тому +2

      of the player? Make a transform variable on the same game, on the save game on TPC set that variable to the actor transform of the TPC. Load is the verse.
      @@soldieroscar

    • @jakespencer917
      @jakespencer917 20 днів тому +1

      having an issue you might be able to help with. If i create a new game, and then save, then load while still in the editor in works.
      IF i create a main menu with the setup in video, create new game, save, exit editor, then hit load game (after confirming the save file exist), it says SaveGameRef is empty still.
      Is this another isValid I need to add? Seems so but just kind of seems odd@@LeafBranchGames

    • @LeafBranchGames
      @LeafBranchGames  20 днів тому +2

      @@jakespencer917 A save game reference is just a reference. You need to load the save game from the harddrive and point the savegame reference to that read information.

  • @kolbasa1234
    @kolbasa1234 Місяць тому

    Nice tutorial, but I have a question. If in a level I have multiples items that can be picked up, and i want to save the GUID of those who have been picked up, how could I go about it?

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      Create a manager class that handles the saving and loading of those objects.

    • @kolbasa1234
      @kolbasa1234 Місяць тому

      @@LeafBranchGames And this manager class where should I instantiate it, inside the GameInstance? Sorry, I'm a bit lost at this

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      @@kolbasa1234 It could be anywhere it makes sense. It could be an actor you place in the world if you only have only one level. If you have multiple levels you likely want to create it early when entering that new level so that you have it available.

    • @kolbasa1234
      @kolbasa1234 Місяць тому

      @@LeafBranchGames Since there would be multiple levels i think the game instance maybe it's the best choice. Also, in the save game, I would only have to save the manager object itself right?

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      @@kolbasa1234No the manager is not there to be saved. The manager is there to keep track of the objects, in your case collectibles. So the manager saves/loads the objects.

  • @karvoni9045
    @karvoni9045 Місяць тому +1

    my inputs are not working when I load the game through "Continue" (game still saved tho) how can I fix it?

    • @karvoni9045
      @karvoni9045 Місяць тому +1

      Okay nvm I got it I am just an idiot and your tutorial made some idiot like me even can do something, thanx alot

    • @TheOnlyKaas
      @TheOnlyKaas 18 днів тому +2

      I have that problem...

  • @louthinator
    @louthinator 23 дні тому +1

    how does this handle things like items being spawned or destroyed from the world? Like say I have a map that has a sword on it that I put there in the editor, and I pick up that sword during runtime thus destroying the actor in the world, if I save, quit, then load again UE usually tends to load the default state from editor then apply any changes from the save game over the top of it, how would this save game system handle something like that?
    Or an alternative example, what happens if I drop a sword into the world that I started with, so it was an actor that didn't start in the world but now has been added and then saved and loaded.
    I've been trying to get around it using a GUID system but it's just getting more and more complex every time I add something.

    • @LeafBranchGames
      @LeafBranchGames  22 дні тому

      Should handle it fine. You can have a manager class that keeps track of items like that in the world.

    • @louthinator
      @louthinator 22 дні тому

      @@LeafBranchGames could you make a tutorial on how to set up such a manager class and integrate it with this save system? because IDK how that works.

    • @LeafBranchGames
      @LeafBranchGames  22 дні тому

      @@louthinator Maybe. We will see. Stay tuned.

    • @louthinator
      @louthinator 22 дні тому +1

      @@LeafBranchGames Thanks. I really hope you do because the ability to save and load a game has been the BANE of my existence since I started my own project, In 3 days it's taken me from being excited about how far I've gotten to absolute burnout.

  • @GhostViper69
    @GhostViper69 2 місяці тому

    How can I make it so my continue button recognizes the last used save slot? I have set up a multiple save file system based off of this tutorial

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      It is just a name/string. So all you need to do is make a function to get that name and use that instead.

    • @GhostViper69
      @GhostViper69 2 місяці тому

      @@LeafBranchGames Where should this function be? Because I have tried this

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      @@GhostViper69In the game instance is fine.

    • @GhostViper69
      @GhostViper69 2 місяці тому

      @@LeafBranchGames I'll play around with it some more. Thank you for the help, and good job on the tutorial!

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      @@GhostViper69 Good luck!

  • @Mohit_N.R
    @Mohit_N.R 3 місяці тому +1

    Great Video, Just What I was Looking for.🙏🏼✨ But how we can Save the Map Data ?!
    For an Example Let's say there is a Bag of Gold in Map - We Collect that Bag. Now we Save and Load The Game - The Bag of Gold will Spawn and We'll Have Infinate Gold Glitch. Same with Enemies, Collectables and Everything. How do we Save All of That !!? 🤔

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому

      Many different ways. If it is an object that is placed in the level to begin with, you can have it assigned a GUID and keep track in the save game in a simple structure with GUID and status (like taken). So when it loads in, it checks against its guid if it should be shown or not.
      Or you could have a manager object that keeps track of a bunch of these objects and it will be the one who saves/loads in which bags and other items should be taken or still available etc.

    • @Mohit_N.R
      @Mohit_N.R 3 місяці тому

      @@LeafBranchGames Thank you for Responding. I don't know what GUID is and I don't know how to do any of the things you just mentioned here in comment. 😅 Is this going to be in level blueprint btw ? And Are you Planning to make a video on this thing ? almost all Channels here are showing Bad Practices. It would be Extremely helpful if you make a video on this 🙏🏼

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому

      @@Mohit_N.R A GUID is an acronym for a GLobal Unique IDentifier. So an ID that you can use to uniquely identify something. If you have 200 identical swords in a game, you can have GUIDS to be able to pick out a specific one you need.
      Nothing would be in a level blueprint. A GUID would be designated by each object that should use one.

    • @Mohit_N.R
      @Mohit_N.R 3 місяці тому

      @@LeafBranchGames Noted, I have to do Research on this to understand more. Seems complicated - I do Hope you'll make a video on this tho. 🙏🏼✨

  • @B7ARTH
    @B7ARTH 11 днів тому

    Will this work for multiplayer?

  • @Ampe96
    @Ampe96 2 місяці тому

    Hey, thank you for your video. I followed your tutorial but i get an error when executing. It says "Accessed none trying to read property SaveGameRef. I don't understand why"

    • @LeafBranchGames
      @LeafBranchGames  2 місяці тому

      This video explains the issue: ua-cam.com/video/9PsoeBM82mk/v-deo.html

    • @Ampe96
      @Ampe96 2 місяці тому

      @@LeafBranchGames thanks, i fixed it. now i'm having a hard time understanding how to save objects located in the world, but i'll figure it out

    • @TheAnevi
      @TheAnevi 2 місяці тому

      how you fixed it?@@Ampe96

    • @jakespencer917
      @jakespencer917 21 день тому +1

      curious, what was your fix for this? I know what and how to use a get valid node, just not sure why it would work in the video without one but fail 100% of the time in my project. I am getting the same accessed none error when trying to read SaveGameRef and am truly lost on why this is occuring.@@Ampe96

  • @Starblendet
    @Starblendet Місяць тому

    I´m a noob...How would I go about saving and loading objects in the gameworld? for example apples in an open world?

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому +1

      Similar questions to this has been asked before, you can find the answer among the comments.

    • @Starblendet
      @Starblendet Місяць тому

      @@LeafBranchGames thank you kindly sir and for a great tutorial!!!

  • @GVMuk
    @GVMuk Місяць тому

    But doesnt the game instance once game has ended lose all data and that save game ref you create and set is no longer valid?
    Im geting a savegame REF invalid as my save game ref is coming back null on the calls.
    If I reload my game without stopping play its fine. if I stop play in editor and try and resume the null savegame ref is happening

    • @GVMuk
      @GVMuk Місяць тому

      So , start new game> create save game object> save the game and reload during play = fine.
      stop play in editor. start play and try to continue = SavegameobjectREF is null

    • @GVMuk
      @GVMuk Місяць тому

      ok update, where you cast to bp_savegame on the load data. if I pull the pin and re-set the the game instances "SaveGameREF" from that cast. its fine strange

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому +1

      A game instance does not keep the information between different play sessions. That is why we create a save game which is a physical file on the computer.

  • @Pierraxl
    @Pierraxl Місяць тому

    Hello i've been trying to save my player on map. It kinda work but i have something i can't load properly. I'm saving and loading player transform but when i'm loading it reset the player rotation to 0 0 0. I've been trying with a vector too and it always get back to 0... are you aware of this issue ?
    Also, when i make a new game, due to the saving procedure, my player start at 0 0 0 location, do you know how i can make him start at any random player start ?
    Thanks a lot ! Great video

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      If your characters rotation is saved as 0,0,0 it will be loaded as 0,0,0 - just make sure to save the correct rotation and then load the correct rotation. It is not realted to the system in any way.
      If you want the character to start at a random start, first get the location he can start and then place him there either in the loading of the level or loading of the character.

    • @Pierraxl
      @Pierraxl Місяць тому

      @@LeafBranchGames Well insite my character i implement save and load from the interface and in the save i just get the actor world transform and set it in the savegameref, i do the same for the loading, and it's only one variable, a transform one, and it succeed to get the position but not the rotation, and it's still the same node ! I'm not saaving 0 at any time it's a blank project where nothing is done aside.
      When i print from Get game instance, save game ref, get player transform after i pressed save, it correctly display the new rotation, when i load, position is correctly loaded, rotation is back to 0, despite the fact is displayed somthing else than 0

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      @@Pierraxl The project and the save game system can not do anything it is not being told. If what you are saying to describe the situation is accurate, the best thing you can do is put breakpoints in your code and follow the code execution to see where in the code the 0,0,0 appears.

    • @Pierraxl
      @Pierraxl Місяць тому

      @@LeafBranchGames I tryed everything and still get my rotation back to 0. I managed to make it work by updating twice after a little delay this is weird.
      Do you know how i can set player position BEFORE anything from the save and load system happen and only on a new game ?

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      @@Pierraxl The begin play even will happen before the load, since it is the one asking for loading info.

  • @TheOnlyKaas
    @TheOnlyKaas 18 днів тому +1

    I have an issue where I cant move when the scene switches. and lots of errors that says:
    Blueprint Runtime Error: "Accessed None trying to read property SaveGameRef". Node: Load Data for Requester Graph: EventGraph Function: Execute Ubergraph Game Inst Blueprint: GameInst
    Please Help!🙏🙏

    • @Chatmanstreasure
      @Chatmanstreasure 18 днів тому +1

      getting same error UE 5.4

    • @TheOnlyKaas
      @TheOnlyKaas 18 днів тому +1

      @@Chatmanstreasure :(

    • @LeafBranchGames
      @LeafBranchGames  18 днів тому +1

      I just tried migrating the tutorial to 5.4, it works perfectly fine. So it is not an engine version issue.
      This video explains what access none is: ua-cam.com/video/9PsoeBM82mk/v-deo.html

    • @TheOnlyKaas
      @TheOnlyKaas 17 днів тому +1

      @@LeafBranchGames I fixed it and get no error now put I still can't move when I press "start new"

    • @LeafBranchGames
      @LeafBranchGames  17 днів тому +1

      @@TheOnlyKaas Moving doesn't really have anything to do with a save game. Make sure you have basics working like proper game controller etc.

  • @AlexF_74
    @AlexF_74 Місяць тому

    Really excellent tutorial. I'm glad it's worked for others however I'm having these 2 errors (pasted below). Any help would be so appreciated. Thank you kindly. FYI I'm using the ALSv4 system (project) if that changes anything. ------- Blueprint Runtime Error: "Accessed None trying to read property SaveGameRef_YT". Node: Load Data for Requester Graph: EventGraph Function: Execute Ubergraph GI Main Blueprint: GI_Main -------- Blueprint Runtime Error: "Accessed None trying to read property SaveGameRef_YT". Node: Save All Data Graph: EventGraph Function: Execute Ubergraph GI Main Blueprint: GI_Main

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      This video should explain things for you: ua-cam.com/video/9PsoeBM82mk/v-deo.html

    • @AlexF_74
      @AlexF_74 Місяць тому

      @@LeafBranchGames Thank you for the link. From what I can tell, the issue is that it's not saving anything initially. I've retraced / followed your steps a second time and am still getting the errors. I'll attempt to do more troubleshooting but any other thoughts / tips would be greatly appreciated. Thanks again

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому +1

      @@AlexF_74 That should not be the take away from the video. The take away should be that you are using an object reference somwhere before it is actually referencing an object.

    • @AlexF_74
      @AlexF_74 Місяць тому

      @@LeafBranchGames Understood. Thanks again

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      @@AlexF_74 No worries. Good luck!

  • @rabihcharafeldin1482
    @rabihcharafeldin1482 Місяць тому

    Am i doing something wrong? Because I am getting this error when I play the game:
    Blueprint Runtime Error: "Accessed None trying to read property SaveGameRef". Node: Load Data for Requester Graph: EventGraph Function: Execute Ubergraph BP Game Instance Blueprint: BP_GameInstance
    I have gone through the tutorial 2 times trying to see what did I do differently but it's all the same. It seems like the SaveGameRef node is not getting anything in the LoadDataForRequester function which is in the game instance.
    Any Help?

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому +1

      Yes, you are trying to use an object reference that is not referencing an object. This tutorial explains why you get the error: ua-cam.com/video/9PsoeBM82mk/v-deo.html

    • @fishwaterhazarddelta2434
      @fishwaterhazarddelta2434 Місяць тому

      ​@@LeafBranchGames Hi! So to work off what this person was saying, I understand that the issue is the fact that it's not valid because it's not referencing an object. What I don't understand is 1) why you didn't have this issue in your tutorial and 2) how to fix it. I mean, if I make sure that if it's not valid, it makes a new reference to the save data, all the data that was saved gets undone. (So in the example of your video, it'll create another save game ref and then my gold will say it's 0 instead of 42)

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      @@fishwaterhazarddelta2434 The short answer is likely either that you missed something in the tutorial or you are doing something differently. So I can't really say how to solve it, because I don't know what you have done. The easiest way to find the root issue would be to debug your code, make sure that it is following the flow described in the tutorial and make sure your variables have values at the points it should be.

    • @fishwaterhazarddelta2434
      @fishwaterhazarddelta2434 Місяць тому

      @@LeafBranchGames ah thank you. I did do some debugging (though before your comment, whoops) and I did find the issue!

    • @LeafBranchGames
      @LeafBranchGames  Місяць тому

      @@fishwaterhazarddelta2434 Glad to hear you sorted it out. What was the problem?

  • @BeryMeryGames
    @BeryMeryGames 3 місяці тому +1

    its a good system but its not so complex and not usable for most of the games
    here some complex things with save system:
    1- we have some actors are spawnable or destroyable and we dont know how to save them because they are not exist in level
    2- for example if we have one component called health and we used for enemies also we dont know how to save it and load it even if we spawned enemy
    3- for example in my case i have building system in my game, i have to save all buildable actors in level and some of these buildable have their own data and components so how we can save it and load it?
    4- using blueprints to save and load its really not a good system to use because if we have more than 1k actors in game and we want to save or load it will crash the game if we have a lot of data, C++ is best way to do save system

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +5

      Thanks for the input. Unfortunately false.
      The system can handle all those cases and more of couse.
      Just to give one example, if you have a specific type of actors that you need to keep track of, maybe exploding barrels, which can be spawned and destroued. You can have a managing actor that keeps track of when and how to spawn these actors if they are destroyed. This manager is set to saveable and will create an array structure to save. Super easy.

  • @SkulkDemon
    @SkulkDemon 29 днів тому

    31:13 you tried it off of the reference but it cant have an object reference

  • @alochaDominiczek
    @alochaDominiczek 3 місяці тому

    Okay

  • @judgejames830
    @judgejames830 27 днів тому

    Includes everything except for including to save the level and player location and rotation :(

  • @trentschultz7175
    @trentschultz7175 3 місяці тому +2

    Gah damn your voice a lot more deeper and crisper wtf

    • @LeafBranchGames
      @LeafBranchGames  3 місяці тому +2

      I was very sick when creating the project and while recording it. My voice has been through hell and back lately.

  • @inspiredexpired9137
    @inspiredexpired9137 15 днів тому

    27:41 Damn I am right here and its not letting me reference self again. don't use this. if you follow other tutorials, it completely ruined whatever i had prior the video like my character selection screen got ruined.

    • @LeafBranchGames
      @LeafBranchGames  15 днів тому

      Not sure what you are talking about. But a save system and a character selection are seperate parts, and don't break the other.

  • @WrongRong-KiRong
    @WrongRong-KiRong 3 місяці тому +1

    Add "LOAD GAME" NEXT to this please

  • @WrongRong-KiRong
    @WrongRong-KiRong 3 місяці тому +1

    Live?