The ultimate guide | How to Save & Load your unreal engine 5 game | ue5

  Рет қаралды 19,981

Ali Elzoheiry

Ali Elzoheiry

Күн бұрын

This video will teach you how to save and load your unreal engine 5 game in the most scalable and flexible way. I aim to teach you good code architecture and how to structure your systems in a way that makes them easily reusable, maintainable and scalable.
By the end you will have a system that contains a reusable save and load system that can be copied into any project, and extendable with custom save functions for a specific project.
The common BPI_SaveGame interface functions for any project are (LoadGameData, SaveGameData, and GetGameData) these can be used as is, then for each different project you can simply implement additional custom functions (Like the SavePlayer and SaveCubes that are specific for this project)
Download the project files and support my channel on Patreon
/ alizoh
Join my Discord server to chat and mingle with the community
/ discord
Chapters:
00:00 Intro
01:20 Explaining my level
02:19 Creating the SaveGame class (The data structure)
07:20 Explaining the UE save and load functions
09:40 Why use GameInstance?
10:38 Creating our custom GameInstance object
11:39 Creating and explaining the interface (BPI_SaveGame)
14:45 Implementing the Save & Load functions in GameInstance
20:15 Creating the checkpoint actor to save the player state
22:20 Explaining the WRONG way to save data
23:22 Explaining the RIGHT way to save data (Adding to the interface)
24:09 Implementing SavePlayer function
27:40 Using saved data in the player
32:31 Where is the save file located?
33:07 Implementing the SaveCubeTransforms function
36:49 Using saved data to spawn cubes in the level
39:35 Saving cubes on spawn and destroy
41:07 Saving cubes on update
44:11 Adding a "Saving Game..." indicator
49:12 Extended version (Async loading)
49:43 Outro
About me:
I've been learning game development for a few years now, I do have a background in software engineering, and I also have a background in education, so being able to combine my love of gaming, software engineering and education is the best way to spend my time.
I am currently working on a few unreal engine games as a hobby, but I am also trying to build a community, thus I am creating KZbin tutorials to find others who are interested in game development and design.
#unrealengine #unrealengine5 #ue5 #gamedev #tutorial #saving #loading #system

Пікірлер: 307
@rogerfoster8020
@rogerfoster8020 5 ай бұрын
I am mostly commenting for the algorithm, but your content is of the highest quality for the unreal engine i have come across. Keep up the amazing high-quality content! I love how descriptive you are on the reasons to do each step and its less like a tutorial to get the system into the game and more a tutorial on how to use the tools of Unreal Engine in a logical fashion. Thank you!
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Thank you for the kind words! I'm glad to hear that you appreciate the level of detail in my tutorials. I'll definitely keep the high-quality content coming for the Unreal Engine community. Your support means a lot!
@Techadron
@Techadron 5 ай бұрын
Hey, we would love to see an inventory system tutorial series from you man. Watched your smart enemy Ai series and its amazing and the best Ai series so far on KZbin. Keep up the good work!!!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hey, thanks for watching and commenting, anything specific you're looking for? or just a basic inventory management system?
@MaxStudioCG2023
@MaxStudioCG2023 5 ай бұрын
@@AliElZoheiry hey you forgot to cut the (chloe get the fk down ..3.2.1 action :)))))))))))))))))
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
@@MaxStudioCG2023 hahah yeah someone else mentioned it and I fixed that hahaha
@MaxStudioCG2023
@MaxStudioCG2023 5 ай бұрын
@@AliElZoheiry haha good :))))
@sametcalik4358
@sametcalik4358 5 ай бұрын
@@AliElZoheiry please make a tutorial on how to create quick item system. Because there is no such course on youtube or udemy. There are mostly tutorials on how to collect items, how to drop items in the inventory, etc. For example; it would be great to see a system where we can have separate slots where skills and quick-usable items in our inventory can be connected and we can switch between objects in these slots quickly without slowing down the pace of the game. My game I developed has become much better thanks to you. I hope we can meet and work together one day. Sincerely regards
@lorenfulghum2393
@lorenfulghum2393 2 ай бұрын
I really appreciate that you teach correct design patterns. A lot of channels just go with the naive solutions and don't even allude to a better way existing. I'm right now coming from having written a "quick and dirty" prototype, and going into rebuilding a proper production codebase. Your channel is so perfect for me right now, these are all the exact things I need to be thinking about.
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
I'm glad to hear that you find my channel helpful. Correct design patterns are crucial for building a robust and scalable codebase, and I'm glad I can provide content that aligns with your needs. Thank you for your feedback and all the best with your codebase redevelopment!
@user-cy9su1uz9x
@user-cy9su1uz9x 4 ай бұрын
You the first guy I see making a save and load tutorial very clearly I watched the entire video without getting bored. I really want to see more tutorial from you man, Keep up the good work.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Hey! Thank you so much for your kind words and feedback! I'm glad you found the tutorial helpful and engaging. I'll definitely keep the tutorials coming, and I appreciate your support!
@nassergreatdeveloper3745
@nassergreatdeveloper3745 14 күн бұрын
Thank you so much. you are legend man. The most important thing in the game is main menu, Setting menu, saving and loading system.
@AliElZoheiry
@AliElZoheiry 11 күн бұрын
You're very welcome! I'm glad you found this helpful🙏 I plan on making a part 2 of this where I make a main menu and custom load/save slots
@tie.garcia
@tie.garcia 4 ай бұрын
Keep going man, no words can describe your work!
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Thank you so much for your comments! I really appreciate your encouragement and support
@allthefame37
@allthefame37 5 ай бұрын
Thank you so much man, these tutorials are awesome!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
You're welcome! Thank you for watching and commenting 🙏
@t6ixfury
@t6ixfury 5 ай бұрын
Perfect timing on this! Just was looking into this!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
That’s awesome! I hope you enjoyed it!
@sutadoralive
@sutadoralive 2 күн бұрын
Hello ! First of all, I'm verry sorry for my broken English. I'm from Japan. I discovered your channel recently and I think it's great to watch your videos that offer such quality content about UE! Well done and thank you so much for it! I am contacting you because I have started the development of an Horror Escape Game on PC. I'm really not a professional in this area, at all, and I would love to see a tutorial about more complex features and, very importantly, a real save menu. There are many good tutorials in English on the subject, but, I only see videos concerning relatively basic save system which do not take into great consideration the triggers (using do once or destroy actor), the collectible objects which would be picked up in several levels, the passage between several levels, etc. What I would really like to see is a tutorial that deals with and clearly explains, in addition to what we basically see everywhere, more complex save system: - Saves (in different slots) and loading games menu - Check points (with a list of all saved check points in the save menu, with the possibility of reloading them) - Attribute and customize the name off the saves - Interactive elements (saving picked up objects, multiple doors when the state changes from open to closed, etc.) - Spawned and destroyed enemies (so that the trigger or event no longer retriggers after saving / auto-saving) - Inventory - When and how properly use Game Instance and Game Mode (with the differences between sublevels and levels) - The save logic between several levels (not just in a single level) - The save logic in a game with only sublevels - etc... A video like this, with great teaching like yours, would be more than exceptional and unique ! Thanks again for all your videos!
@AliElZoheiry
@AliElZoheiry Күн бұрын
Hey there! Your English is great, no need to apologize. Thank you so much for your kind words and suggestions. I've noted down your ideas for a more complex save system tutorial and will consider them for future videos. I truly appreciate your support and hope to create content that meets your expectations! Thank you for watching and reaching out to me 🙏
@CallMeMistaPepe
@CallMeMistaPepe 4 ай бұрын
I will be subscribing to your Patreon! You make things others don’t and that’s worth paying for!
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Thank you so much for your support! I really appreciate it and I'm glad you find value in my content. Your support means a lot to me!
@RoryMcC42
@RoryMcC42 5 ай бұрын
I gain valuable unreal knowledge from every video you post. Keep them coming! Thank you for sharing.
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Glad to hear that! Thank you for your comment. I'll definitely keep them coming ;)
@jorrdan.
@jorrdan. 4 ай бұрын
Thank you for going in depth with everything! It felt as easy to follow as the average tutorial but with the depth of actual docs, so it was easy to understand and retain the information
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey Jorrdan, that's great to hear! I'm always happy to receive such comments, because then I know it was received as intended. Thank you for that 🙏
@Kurock1000
@Kurock1000 3 ай бұрын
Wow. The best I’ve seen. Explains the concept and reasons which are sorely lacking elsewhere.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
I really appreciate your comment. Glad you found it helpful and thanks for watching 😊🙏
@ericosantili8688
@ericosantili8688 Ай бұрын
This is absolutely GOLD my man, thank you very much for the clear explanation.
@AliElZoheiry
@AliElZoheiry Ай бұрын
You're most welcome! I'm thrilled that you found the explanation helpful. Thank you for watching and commenting 🙏
@oanxem2261
@oanxem2261 2 ай бұрын
I absolutely love your videos! Words cannot express how grateful I am for the incredibly helpful content you provide.
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Thank you so much for your kind words! I'm truly happy to hear that you find the content helpful. Your support means a lot to me!
@AaronStumpDesings
@AaronStumpDesings 4 ай бұрын
Really appreciate these tutorials and how in depth you explain things. I like to understand why I'm doing something and not just copy and paste. Keep em coming!
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Thank you for saying that 😊🙏 that is exactly what I was going for. Glad you see the value in it
@nwhajlawn6224
@nwhajlawn6224 5 ай бұрын
man i really wanted this, man you are really an angel😭. Thank you making this now I will go and watch this video I know it will be very helpful
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
You're very welcome! and thank you for your comment! I hope you find it useful 🙏
@Tegurd
@Tegurd Ай бұрын
Thanks for the tutorials! Probably the best on KZbin.
@AliElZoheiry
@AliElZoheiry Ай бұрын
You're very welcome 🙏 glad they have been helpful
@taliesinsilvercrow9736
@taliesinsilvercrow9736 Ай бұрын
thank you! you explained everything wonderfully, and this was so easy to follow and understand. i have been putting off creating a save and load / continue game system for awhile
@AliElZoheiry
@AliElZoheiry Ай бұрын
You're welcome! I'm glad you found the tutorial helpful. Don't hesitate to ask if you have any other questions! 😊
@okinava_play
@okinava_play 5 ай бұрын
Thank you bro! Awesome like always
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Any time! Glad you enjoyed it!
@drakouzdrowiciel9237
@drakouzdrowiciel9237 2 ай бұрын
This tutorial was incredibly informative.
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Thank you for your kind words! I'm really glad you found the tutorial helpful. If you have any more questions or need further clarification, feel free to ask.
@bbproductions8975
@bbproductions8975 Ай бұрын
This is amazing! Really well explained and clear instructions with what to do and why you are doing it. A lot better than other tutorials out there. This is really underrated!
@AliElZoheiry
@AliElZoheiry Ай бұрын
Thank you so much for your kind words! I'm really glad you found the tutorial helpful. Your feedback means a lot to me 🙏
@artkalm
@artkalm Ай бұрын
Now that was very helpful! Best save/load system explanation I've seen so far. Thank you very much for this tutorial, it really made my work a bit easier.
@AliElZoheiry
@AliElZoheiry Ай бұрын
I'm so glad to hear that you found the tutorial helpful! Thank you for your kind words and support. 😊
@amariu1948
@amariu1948 28 күн бұрын
really informative thanks alot bro, need more tutorial videos like this
@AliElZoheiry
@AliElZoheiry 27 күн бұрын
Thank you for the kind words! I'm so glad you found it helpful. More tutorials are definitely on the way. Stay tuned!
@mikelkram
@mikelkram 5 ай бұрын
Many thanks to you for your lessons. You explain the code very well.
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
You're very welcome! Thank you for watching and commenting, happy to hear it was helpful
@vabhinavvahalla
@vabhinavvahalla 18 күн бұрын
good quality videos man, thank you
@AliElZoheiry
@AliElZoheiry 15 күн бұрын
Glad you're enjoying the videos! Thank you for your support 🙏
@aufgespielt3768
@aufgespielt3768 Ай бұрын
Very helpfull for us! Thank you so much for you’re time!
@AliElZoheiry
@AliElZoheiry Ай бұрын
You're very welcome! I'm glad you found it helpful. Thank you for watching and commenting 🙏
@MasthaX
@MasthaX 3 ай бұрын
Very good quality content from you. I like how you explain the right way of separation of code/data and functionality. I've seen many videos of people just slapping everything in their player/controller blueprints, which will probably work most of the time however it's very bad practice. I think it's due to the fact that many people who jump into UE don't or yet have a very knowledgeable understanding of software architecture.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Thank you for your feedback! I'm glad you appreciate the value in what I'm trying to do. It's definitely an important aspect that contributes to cleaner and more maintainable code.
@fatihersy
@fatihersy 2 ай бұрын
Great video, Liked!
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Thank you! I'm glad you enjoyed it. Your support is appreciated.
@XehanortLP
@XehanortLP 2 ай бұрын
As a gamedev student in the fith term I can't thank you enough! This time we are completly free in choice of the genre and you are an absolute beast explaining things like this! I really hope you continue with the videos man, great work!
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Thank you so much for the kind words! I'm really happy to hear that the content has been helpful to you. Best of luck with your game development studies, and I'll definitely keep the videos coming!
@vanes44r
@vanes44r Ай бұрын
This is very cool!! thank you
@AliElZoheiry
@AliElZoheiry Ай бұрын
Glad you liked it! You're welcome! 😊
@TheWufstyle
@TheWufstyle 5 ай бұрын
Seen a couple of your tutorials, and just wanted to compliment you on teaching good coding.. Instead of "bad coding for the sake of this tutorial".. Keep up the good work.. Too many creators cut corners with bad practices, which in turn really dosn't teach anything useful..
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Thank you so much for your comment. I'm really happy that you see the value I'm providing. This is indeed the niche I was going for
@itamihanzo
@itamihanzo 5 ай бұрын
Fantastic stuff!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Thanks! Glad you found it useful
@OverlandBound
@OverlandBound Ай бұрын
Another thank you my friend. Spent the weekend revamping my save load system using this method. I had surprisingly few issues given the complexity of my setup. It is a vast improvement. I had function logic in BP_SaveGame and it confused my brain. This is easier to track and follow.
@AliElZoheiry
@AliElZoheiry Ай бұрын
You're very welcome! I'm glad to hear that you found the method helpful. Simplifying the logic and tracking it more easily can definitely make a big difference!
@Fizziepop
@Fizziepop 2 ай бұрын
Comments are good, so here I am because you are great. I am not though, I missed the naming of the SlotName variable at 12:27, it took me 13+ hours of re-playing the vid and some help to figure that out. But I got there! Thank you for your content! It's good to be learning the best ways to do things, instead of the messy ways.
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Hey, thanks for your feedback! I'm glad you found the content helpful, and I appreciate your perseverance in troubleshooting the issue with the SlotName variable. Keep up the great work!
@akib2161
@akib2161 5 ай бұрын
thank you so much for this totural i waanted this saving an loading was the ony thing that i did not had any idea in gamedev but now i will
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
You're welcome! that's great to hear that it was helpful 😇
@w33dsmoke61
@w33dsmoke61 4 ай бұрын
7:50 ive been searching for a week for someone to explain this shit the way youre doing. my brain cannot learn if someone else is doing all of the steps(work) for me. i REALLY hope you make more ultimate guides....
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey, thank you so much for your comment! I'm really glad to hear that my teaching style resonates with you and that you find the explanations helpful. Rest assured, I'll definitely be creating more ultimate guides in the future. Keep an eye out for them!
@youngjojo3052
@youngjojo3052 3 ай бұрын
Look, I’ve been working in unreal for a few years now and I’ve created some decent save and load system but this right here is gold. I never understood why people create save and load method in the player character or game mode 😂😂😂 thank you mate
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Thank you for your comment! I'm glad you found the tutorial helpful 🙏 Happy game developing!
@hadescrypt3371
@hadescrypt3371 4 ай бұрын
Went from learning unity through youtube tutorials and online courses to then trying to learn unreal through youtube and you are the first channel I've came across where I felt like I was actually learning properly and actually getting a grasp on the concepts of game development and not just copying what the person was saying, the way you present and do these videos inspires and motivates me, had problems of loosing motivation countless times I've deleted so many projects that i started and just completely lost the will to keep trying, but i honestly get so motivated and learned so much watching your tutorials, so thank you. Can i suggest doing a inventory system video? sort items, look at their stats, apply armour and switch out weapons etc, as its a common thing in games. Personally i would love a AI companion tutorial (Have a soft spot for good companion mechanics such as in assassins creed 3), have a few AI characters you can recruit either from paying them or doing a mission for them and have them follow you and you can give them items to wear or weapons to use and help in combat, tell them to wait, or to patrol the area etc, but a inventory system i think is something people would love especially being a fundamental mechanic in a lot of games
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey Hades, thank you for your comment. I'm really glad you found this useful, and I appreciate that you see the value I provide. And thank you for the video suggestions. The inventory system is indeed an interesting one. I suggest tutorials by "Ryan laley" he has an entire series on making an inventory system
@crs11becausecrs10wastaken
@crs11becausecrs10wastaken 3 ай бұрын
Had to comment, this level of detailed explanation has been very helpful. Currently, I'm attempting to have the game create a new save slot each time a new game has started and the information of those slots updated in the load game widget. So far it's gone horribly, but I appreciate you showing where the best places to store and retrieve data should live.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Hey there, thank you for your kind comment! Creating new save slots for each game start and handling the information update in the load game widget can be a bit tricky at first. I'm glad the detailed explanations have been helpful, and I'm confident with a bit more practice it will start to come together smoothly. Good luck with your game development endeavors!
@treblath1995
@treblath1995 4 ай бұрын
You are the king💜🙌🏽
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Thank you for your kind words! I'm glad you're finding the content helpful 🙏
@kellowattentertainment
@kellowattentertainment 5 ай бұрын
You are really the best, honestly. Thank you for your videos and dedication to helping persons like myself be better at Game Development using Unreal. It's really appreciated. What I would love to see is a mission/quest system. I know that would be awesome. So the quest system can have for example: Collecting Items Quests (This would be collecting a certain amount of items, either you collect the items for yourself, or you collect the items and give them to another character) Killing Enemies quests (This can be killing a certain number of enemies or killing all enemies that are either spawned or placed in a level. The number of enemies spawned can vary by being random. It would be really awesome to see how to store the data of spawned enemies so that it automatically plugs into the amount that should be killed on that specific mission. That way you could choose whether to have a set amount of enemies killed to pass the mission, kill all the enemies, or the mission could start by saying kill 5 enemies, but then others are spawned and the objective can be updated while the mission is still active to kill those that are spawned as well making the game more dynamic and enjoyable.) Interacting with actors or character quests (This can be to go to someone and then a small dialogue can be played etc, pick up a specific item. That sort of thing. Like at the start of the game, there's an objective to pick up a sword and another objective of the same mission to equip the sword... that sort of thing) Going to a certain location quest (Have the player journey to a specific location in a level) Timed missions (This is where you have to complete any of the four main mission types listed above at a given time... normally you'd have to get to a checkpoint before the time runs out or collect certain items within a certain time) Combined missions: where you could fuse different mission types into one. For example, you could have the player kill enemies within a certain location, if an enemy is killed outside that specific location, it doesn't contribute to passing the mission. My apologies for the long comment, I just wanted to explain what I'd like to see.
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hey Kellow, thank you so much for your kind words and your suggestions. I take all suggestions into account, I put them in a list and prioritize them with each new video, so this is very helpful. Thanks again and I'm glad you're enjoying my videos so far 🙏
@EpicMonkeyAD
@EpicMonkeyAD Ай бұрын
Absolutely awesome content man, really appreciate this stuff. Keep it coming. You made the thought process and the process itself so simple to understand. I used to get overwhelmed by the amount of code I was working with, trying putting everything into one event graph. It makes me want to go back and watch some earlier tutorials from others and see if I can implement this process into it. Really looking forward to content from you in the future. If you see this, do you have a patreon or any other place you post content?
@AliElZoheiry
@AliElZoheiry Ай бұрын
Thank you so much for your kind words and support 🙏 I'm really happy to hear that you found my content useful! I indeed do have a Patreon, the link is www.patreon.com/Alizoh
@ronaldmaningat3681
@ronaldmaningat3681 4 ай бұрын
Thank you. your tutorial is the best. you save me
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
You're very welcome! I'm glad to hear that this tutorial was helpful for you. Nice pun btw ;)
@perochialjoe
@perochialjoe 4 ай бұрын
This was really useful, thanks a lot! A useful addition to this tutorial would be to save things like enemies, their position, health, alert state, if they're dead, etc- especially since you've got your series on enemy AI. The cube position was useful but it feels like this can get really complex really fast.
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
I'm really glad you found the tutorial useful! Thank you for the suggestion. Saving enemy state and position does indeed add complexity, but it's definitely something worth considering for a future tutorial.
@perochialjoe
@perochialjoe 4 ай бұрын
​@@AliElZoheiry Just wanted to give an update that I was able to use the information from this video to save / load more complex things like enemies and have them fit back in seamlessly. So the information applies very well! Thanks again for the video, it really was a big help for me and I imagine plenty of other people too.
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
​@@perochialjoethanks for the update, really glad to hear it was helpful for you 🙏
@mahkhardy8588
@mahkhardy8588 5 ай бұрын
Good save game tutorial for beginners. If you dont like the spaghetti inside of a function just treat your input variables as if they were local variables. The 2 most important parts of this are: 1 use the game instance, even if the game is multiplayer. 2 create base classes for anything you want to save, so that like the end of this video you put save functions in those base classes.
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Thank you for your comment, I hope you enjoyed it!
@beppolaut605
@beppolaut605 5 ай бұрын
awesome!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Glad you liked it!
@user-ol9zd1zy4x
@user-ol9zd1zy4x 3 ай бұрын
Jesus told me to tell you that He loves you and I wanted to add that you did a fantastic job with presenting this entire concept. Really great job man.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Thank you! and tell Jesus that I love him too 😁. Glad you found this useful! Thank you for watching and commenting
@SweetChili63
@SweetChili63 13 күн бұрын
Thanks Ali, this tutorial is amazing! Thank you for properly explaining every step as opposed to just telling us where to put what blueprint :D I was hoping you could help me with a follow-up question; How would you go about saving and loading a huge amount of different spawned blueprint actors as opposed to only the BP_Cube in this case? So far example BP_Cube, BP_Cylinder, etc. etc. Thanks!
@AliElZoheiry
@AliElZoheiry 12 күн бұрын
Hey SweetChili! Thank you so much for this, I really appreciate you 🙏🙏 Regarding your question: the principle is the same, you want to identify what you want to save about your actors, only the minimum amount of information needed to perfectly recreate their state, that could be as simple as the actors class and their location in the world, then you can make a struct out of the data you want to save about your actors, and then just save an array of that struct type. Then when the game loads, you loop over your array and respawn the actors based on the loaded data
@ryanjdevlin87
@ryanjdevlin87 4 ай бұрын
Anyway you can expand on this topic in a future video and talk about using this system with level instancing, main menu/ pause menu UI and possibly adding thumbnails to the save file ?
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey Ryan, definitely something on my list. I could potentially make a full series out of this, stay tuned ;)
@ryanjdevlin87
@ryanjdevlin87 4 ай бұрын
I'll b here :)@@AliElZoheiry
@ryanjdevlin87
@ryanjdevlin87 4 ай бұрын
and also honestly it would be incredibly helpful, I can seem to only find tutorials on 1 subject or the other never linking them all together like you need to in a finished game. This would seem to be the "secret sauce" :)@@AliElZoheiry
@SeanLaoProductions
@SeanLaoProductions 2 ай бұрын
Hey Ali! Amazing tutorial as always! Quick Question; For things to save (Enemies, Items etc..) when you have different levels, would the best practice be to make an array of each level separately? Or is there a better way to do it? For reference; Think of the classic resident evil games, where each room was its own Level. In order to keep track of number of enemies killed, would they have an Array of enemies for every different level or via another method?
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Hey there! I'm glad you enjoyed the tutorial! In regard to keeping track of enemies and items in different levels, it's definitely a good practice to organize them based on the levels. You can have your SaveGame data organized as a Map (Map here being a Data type also known as key value pair) where the key is the name of the level and the value is a LevelSave struct, and inside that struct you can have multiple structs as well. That's just one way of doing it of course, it will all highly depend on what you want to save.
@DylanPlayzz871
@DylanPlayzz871 Күн бұрын
I don’t know if your still ready comments in videos from 4 months ago but if you are I would love love love to see a good weapon system video. I been following someone and watching how they do it but they are in consistent Chang things to much and are just breaking the code. To the point where a game I’ve been working on is now just useless and I don’t know what to do. The video concept was having it where the player can hold more than one gun in inventory. One is in hand. And on is in inventory. And you have an option to put both away and just go with hands. Then he changed them all messed it up and then added an ammo system and it just got all confusing. I do want an ammo system but learning the weapon system and ammo system from someone who teaches like you do would be amazing.
@AliElZoheiry
@AliElZoheiry Күн бұрын
Hey there! Thank you so much for your suggestion, I appreciate your support and feedback. I'll definitely consider creating a video on a weapon system and ammo system in the future. Keep an eye out for more content!
@DylanPlayzz871
@DylanPlayzz871 Күн бұрын
@@AliElZoheiry thank you. It would be so much help. Would pretty much finish my game at this point.
@Lu1Vitor
@Lu1Vitor 5 ай бұрын
Professor, agradeço pelos vídeos. Você está me auxiliando muito no projeto, no qual estou participando.
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Fico feliz em poder ajudar! Obrigado por assistir e participar do projeto 🙏
@zakariazeddam1438
@zakariazeddam1438 Ай бұрын
FIRST of all thank you for the best tutorial i have ever seen, SECOND, i am trying to make this into a multiple save slot system but changing the same slot name isnt working. any advice on how i should go about it ?
@AliElZoheiry
@AliElZoheiry Ай бұрын
Hey there! Thank you for your kind words, I truly appreciate it! Having unique names for the save slot should be enough. Not sure why it wouldn't work for you 🤷‍♂️
@consistentlyinconsistent1
@consistentlyinconsistent1 14 күн бұрын
hello great tutorial for showing how to separate and use BPI's effectively, I'm having trouble saving my "cubes" I've set up the code the same way minus the level blueprint as I am only spawning an actor with a key input yet they do not save transform.
@AliElZoheiry
@AliElZoheiry 11 күн бұрын
Hey there! I'm not sure I understand the issue, but if you're data is being saved and loaded, but try printing the loaded data to see it's value, and if nothing is saved at all, then you must have missed something in one of the save/load functions, I suggest going over it again
@CatZoooGameDev
@CatZoooGameDev 4 ай бұрын
Hi Ali, I love your AI series its Great! Can you make a video about "How to add cheat code in Game for Developer Testing :)
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey there! Thank you so much for enjoying my AI series and for the suggestion. Adding cheat codes for developer testing is a really interesting idea, I'll definitely consider it for a future video. Stay tuned and thanks for watching!
@CatZoooGameDev
@CatZoooGameDev 4 ай бұрын
@@AliElZoheiry Thank you Ali 😄
@simonandersson6871
@simonandersson6871 5 ай бұрын
Great video as always! One question thought Lets say you want to store a bunch of different things, such as Player Stats, Settings Preferences, Game state, Inventory, Game Progression, Level & XP etc... Would you rather have just one single SaveGame and Slot and store a unique struct for each category in that SaveGame - or would you have one SaveGame and Slot per category?
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
According to the official unreal documentation: The system is made to support saving different save game files to different slots to support separating globally-unlocked features from playthrough-specific game data. So you should definitely be using separate SaveGame files for data you want to save and load separately
@simonandersson6871
@simonandersson6871 5 ай бұрын
@@AliElZoheiry Alright cool! Thanks for the reply, keep the vids coming - your videos and guides are among the better UE ones here on youtube for sure.
@syberhacker7121
@syberhacker7121 5 ай бұрын
I was seaching for it from long ago for my game
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Nice! Hope it's useful 🙏
@judgejames830
@judgejames830 Ай бұрын
This was very good! would love to see some basic variables saved like has a key? or has a item? and a major loss was not having running this from a start menu from like a New Game or even Continue Game, so I'm still stuck :(
@AliElZoheiry
@AliElZoheiry Ай бұрын
Hey there, thank you for the feedback! it's a great suggestion and I'll look into including that in a future video. Keep an eye out for it! 🙏
@dzmitryyafimau7647
@dzmitryyafimau7647 2 ай бұрын
Amazing tutorial and a great channel overall, keep it up! I was experimenting with a saving system too and there is one thing that bothers me. You can dress a level with collectible items, however, you can also drop them from the inventory. And there is a bit of a problem - it's hard to manage the Saving System like that. Because some of the items are constructed automatically and then need to be updated if they were collected (aka destroyed) and spawned items that were saved also need to be respawned on load, but they also might have been spawned and collected previously. And it becomes a huge mess and a nightmare to manage. How would you tackle something like that?
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Hey there! Thanks for the support and I'm glad you're finding the tutorials helpful. Managing a saving system with collectible items that can be both automatically constructed and manually dropped can definitely be tricky. One approach would be to maintain a unique identifier for each item and store their states (collected/not collected) in the save data. This way, upon loading, you can respawn the items based on their state in the save data. It's a complex issue, but maintaining a clear data structure and carefully managing the update and respawn logic should help tackle this challenge.
@dzmitryyafimau7647
@dzmitryyafimau7647 2 ай бұрын
@@AliElZoheiry Thanks for the response! I'm trying exactly that approach. However, I can't help but notice that it's not very efficient to update all manually placed items on load every time and destroy them if they were collected. I liked your idea not to have the item in level from the get-go but rather spawn everything that you need on beginplay. That way all items could be grouped into the one "spawned" category and that should help manage them more easily. But that would introduce more hassle for the initial setup. Maybe there should be an empty actor-spawner with some parameters to pass to the item on spawn or something like that. Hard to tell from the top of my head without experiments. Thank you anyway, wishing you all the best!
@zrmdevelopment7260
@zrmdevelopment7260 5 ай бұрын
Nicee
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hope you found it useful 🙏
@Space22-fu1iz
@Space22-fu1iz 5 ай бұрын
Would be interesting to see how you would create a inventory system a lot of the one on here you cant really build other systems to talk to the inventory it becomes a task just to get them to talk to each other
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Thank you for the suggestion. I have it in my list of ideas for future videos. So stay tuned ;)
@dadbrasil
@dadbrasil 8 сағат бұрын
Great tutorial, but I have a problem, I have items that I manually dragged into my scene and even tho their current position is being saved, they are not replacing the original objects, so the original objects spawn every time I load the game, resulting in several copies of the object, any ideas?
@treblath1995
@treblath1995 4 ай бұрын
This can be usable for inventory objects and other levels of map? Thanks for your grate content!🙌🏽🙏
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey, yes this can definitely be used to save inventory objects and current levels. Glad you found it useful !
@treblath1995
@treblath1995 4 ай бұрын
@@AliElZoheiry thanks a lot🙏💜
@blablup1214
@blablup1214 25 күн бұрын
Still not finished the video, but I wanted to post this question I got while hearing your description, a for the algorithm b for my memory , so I don't forget it. If you save something asynchronos. What happens if you change the data while you are saving ? ( Guess something like that can only happen if you save huge data ) For example weapon is a start save he hasn't saved weapon a yet switch weapon to b save is completed ?
@AliElZoheiry
@AliElZoheiry 25 күн бұрын
2 things can happen: 1. The old data is saving, you change it, that triggers a new save function call and it overrides the old save data, so everything is fine. 2. OR, The old data is saving, you change it, that triggers a new save function call, and the old call finishes AFTER the new one, thus saving old data. That, in software, is called a "race condition" and is an unfortunate side effect of asynchronous functions. So you should prevent 2 saves from happening at the same time just to be safe
@user-hl9zu2xg9h
@user-hl9zu2xg9h 14 күн бұрын
Hi Ali, I'm using your combat system and implementing the save functionality from this tutorial. I have two questions, first is loading the enemies back on the map. I'm using a for each loop with the transforms that I then spawn actor of the enemy class. When I do this the enemy is in the correct location but just stands there and moving towards me, how get them to move again? Second question in using that same combat system how do I load the current health?
@AliElZoheiry
@AliElZoheiry 11 күн бұрын
Hey there, for spawning enemies dynamically, make sure that in the character class of the enemy you set the "Auto Possess AI" to be "Placed in world or Spawned" otherwise the AI controller doesn't possess the enemy when spawned. Regarding saving the current health, it's the same way, just save the health variable from the BPC_DamageSystem, and on load set it again. Just like I did in this tutorial, but instead of setting a health variable in the character class, you'll see the health variable in the damageSystem component
@Admiral_Storm
@Admiral_Storm Ай бұрын
This tutorial has been most insightful. I am having a little bit of difficulty modifying it to be used with UI buttons to save the data and getting it to load back up. Is there some trick to getting that to work?
@Admiral_Storm
@Admiral_Storm Ай бұрын
Never mind I managed to figure it out.
@AliElZoheiry
@AliElZoheiry Ай бұрын
Hey there! I'm glad you found the tutorial helpful. Happy to hear you figured out the solution. Well done 💪
@Ridihane
@Ridihane 2 ай бұрын
Hello! I really love your videos! I'm in my way to watch everyone of them! It's really nice how you take time to explain what you're doing! I just have a problem, when I go to the checkpoint it work fine when i reopen the game but when i just quit without doing anything and reopen again, only the location was kept and the rest (camera rotation, player stats were all reset to default) Sorry if i don't explain correctly but checkpoint work, but if I just open the game after going through checkpoint and don't do anything and quit, when reopening, all but character location are reset I retested it and if i just move through the checkpoint again it works, is there a way so I can open the game, and without needing to through the checkpoint again, when i quit and reopen, it'll load the last time I overlap the checkpoint ?
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Hey there! Thanks for your kind words and for watching the videos! I am not sure I understand the issue correctly, but the checkpoint should save all this information that is in the PlayerSave struct, and if some of these values aren't loaded when you quit and reopen, I suggest printing the values that are loaded and see if they are correct, this will help you narrow down if the problem is that this information was lost when the game was closed, or was it loaded correctly but not used correctly when opening the game for the first time. Then from there you can find a solution
@erook2019
@erook2019 Ай бұрын
Someone helped me figure out the same issue, just add a 0.1 sec Delay node before the saving code in the Checkpoint BP!
@syberhacker7121
@syberhacker7121 5 ай бұрын
Sir can you make a tutorial about Blackboard ai tree I fell difficult while working with it
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
I have an entire 22 part series on AI and beheavior trees on my channel. Check it out
@pigslayer
@pigslayer 3 ай бұрын
Your tutorial has been super great for a game my friends and I are working on thank you! For some reason we can’t find the set player save node at 24:50, do you have any idea why this could be happening?
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Hey there, glad you found it useful, thanks for watching 🙏. Regarding your question, the "Set player save" isn't a function that exists in unreal engine, this exists for me because I have a variable called "PlayerSave" on my SaveObject, so I'm just setting the value of this variable at the timestamp you mentioned. So if you don't have that variable you won't have that node either
@pigslayer
@pigslayer 3 ай бұрын
Oh I see! That makes so much sense, thank you so much!
@bkkaan52
@bkkaan52 17 күн бұрын
@@AliElZoheiry that node gives me accessed none error :(
@sara-uh8xy
@sara-uh8xy 5 ай бұрын
noice i needed a save system xD. want a series on replication of all the series so far will be useful
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Awesome! I hope it helps. I'll definitely consider replication soon, but as soon as I master it myself 😅
@AhmedBilal-ef9zf
@AhmedBilal-ef9zf 2 ай бұрын
Hey ali, i'm confuse about where this call function (Equiped weapon) came from
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Hey there! This function was just something I created when setting up this sample project, it's not part of the tutorial. Just like the spawning and destroying cubes functionality. Just some sample features to show case the saving functionality
@hewitt003
@hewitt003 4 ай бұрын
I don’t know if it is a me error, likely is 😅 Although at 32:08 where you finish up using the load system, you mention a Weapon Class for your project, although in mine as it is a horror game, doesn’t have a weapon class to call. I am making a new blank project and had game instance, character class etc. created but I think my problem that I don’t seem to be getting is how to call that character class as you use a call function you made for the weapons, I only have an initialise function for event begin play for my playable character but unfortunately playing with inserting a input and class there didn’t seem to load me anywhere… I am new to Game Development with only 1 team project, definitely want to make this tutorial work although everything up to this point has been checked at least 2 times over so I don’t know why I won’t load when the print string mentions the game has saved 😅 Either way, has been a fun tutorial and very clear so I do like that, just this one part that has me facing a roadblock Thanks regardless, now having knowledge on saving ^_^
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey there, thank you for sharing your experience. I don't fully understand what the problem is that you're facing. But my advice is the same as I mentioned in the beginning of the video: Make sure to think of what data you need to save to be able to recreate the state of your game, then when the game starts, load that data, and use it when you initalize your player. In my use case, I wanted to store what weapon the player was carrying when they reached a checkpoint, that's why I added the weapons "Class name", then when I start and load the game, I check if there is a saved weapon class, and if so, I spawn and recreate it. Follow the same approach for anything you want to be respawned when the game starts
@hewitt003
@hewitt003 4 ай бұрын
@@AliElZoheiry gotcha, thank you ^_^ I do think it’s just that, figuring out how to reference my first person character in the purple class node, as the print string works but no loading is being done so likely once I figure that out, I should be good Considering everything is done the same way ^_^ I’ll hopefully figure it out XD
@MaxStudioCG2023
@MaxStudioCG2023 5 ай бұрын
you should expand it 1 more episode with the menu saving (when player chose save,load from widget buttons, and to slots)
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hey, thank you for the suggestion, I’ll definitely consider it
@MaxStudioCG2023
@MaxStudioCG2023 5 ай бұрын
@@AliElZoheiry thanks , by the way great tutorials !
@_tommunist_
@_tommunist_ Ай бұрын
For some reason I can't get my brain to put it together, but how would I set this up to load the last level that the player was in? Say I have a save game, I click continue in the main menu, and then it would load the player back into the last level they played. Either way, great tutorial man!
@AliElZoheiry
@AliElZoheiry Ай бұрын
Hey there! Definitely, to load the last level the player was in, you would need to save the level information when the game is saved, and then upon loading, you'd retrieve that saved level data and load the corresponding level. I'm glad you enjoyed the tutorial!
@Braydon.W
@Braydon.W 5 ай бұрын
00:45:08 - Pause, GET THE FUCK DOWN. Haha! Thanks for another great lesson Ali!
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hahahaha omg... I should have cut that out... 😅😅
@sonofzues8414
@sonofzues8414 3 ай бұрын
great tutorial bro, but i lost you where you were making a new checkpoint cause I already have one in my game and now i don't know how to just connect it with your code.
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
You can either save the location of the player when they enter the checkpoint, or save the location of the checkpoint itself, at the end of the day, you just need a player location vector in your save game class
@HigashiBashi
@HigashiBashi Ай бұрын
How would you go about saving Destroyed Actors and stop them reloading?
@AliElZoheiry
@AliElZoheiry Ай бұрын
You'd need a way to identify the destroyed object through some unique identifier (either a unique name, tag, or transform even) then when you destroy it, just store the unique identifier in an array of "Destroyed objects" then once the game loads, if any of the objects in the game are in the array of "destroyed objects" then destroy them (assuming they spawn by default in the level)
@syberhacker7121
@syberhacker7121 5 ай бұрын
One video suggestion. Sir can you make game graphics setting tutorial?
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hey, thank you for the suggestion, I'll definitely consider it 🙏
@syberhacker7121
@syberhacker7121 5 ай бұрын
@@AliElZoheiry please next video on this topic please
@LetsPatrick
@LetsPatrick 5 ай бұрын
can u make a next steep and go to database (mysql)?
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Hey LP, that would be more related to web development since it's about setting a server side backend to store data, so it would be quite far removed from the scope of unreal engine
@MoroDZGamer
@MoroDZGamer 4 ай бұрын
Habibi is possible to a tuto for AI_Enemy Shooter and take cover ?
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey, thanks for the suggestions, I'll add them to my list
@MoroDZGamer
@MoroDZGamer 4 ай бұрын
Inchallah@@AliElZoheiry
@nhoxcz747
@nhoxcz747 2 ай бұрын
Hi , amazing video, but i have big problem. It doesn’t work for me.. it is possible that problem is that my character is first person and hasn’t mesh? Or it’s working for fps and i just did something wrong? Thank you for any information
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Hey there. Not sure what the problem is your facing, but just make sure that everything you are saving to the SaveGame object is relevant to your game
@SykoSilver
@SykoSilver Ай бұрын
How does this save system reflect the observer / mediator patterns? Just trying to wrap my head around things.
@AliElZoheiry
@AliElZoheiry Ай бұрын
Hey there! The Save system does not apply neither the observer nor the mediator patterns, because I directly call the Save function from the GameInstance, this means that there is a dependency between the GameInstance and the classes using it. To utilize the observer pattern here, would be to publish a "SaveGame" event without directly referencing the GameInstance, and then have the GameInstance use that "SaveGame" event to call it's own functions. Though that would be overkill, since depending on the GameInstance is not something you should try to avoid, since all actors pretty much depend on the GameInstance in one way or another, so decoupling those won't bring that much benefit
@SykoSilver
@SykoSilver Ай бұрын
@@AliElZoheiry thanks - for the past couple days I've been working on this and I've basically come to the same conclusion. All the logic is in the game instance and even using interfaces, it requires referencing the game instance if you call from a widget blueprint for example. I'm actually not sure I should even be bothering with interfaces. But in an ideal world it would be a game instance subsystem. Unfortunately this is only currently possible through C++. Hopefully possible through blueprints in the future.
@Yuguta420
@Yuguta420 4 ай бұрын
Yo Ali, im just a fan kindly asking if you can make a small tutorial on how the character can face or look at the enemy near him and after attacking he goes back to his normal rotation(just a second that the character will face the enemy then returns to his normal rotation) thank u
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey Hazem! Thank you for the suggestion. I'll add it to my list and work on a tutorial for that soon. Appreciate your support!
@Yuguta420
@Yuguta420 4 ай бұрын
thank u wish u all the best@@AliElZoheiry
@GoldBl4d3
@GoldBl4d3 25 күн бұрын
This is not what interfaces are intended to do. The interface will still cast and type check. An interface is not for decoupling either. Its for providing consistent functionality between -unlike- types. Instead you should store the gameinstance reference in a static variable or data asset where it can be retrieved easily from anywhere. Better yet, make a blueprint func library to wrap it.
@AliElZoheiry
@AliElZoheiry 25 күн бұрын
Hey there, thanks for the suggestions. The interface here is to easily replace the Gameinstance with any other class, as you can have your own custom gameinstance as well or you may want to use another class for any reason, so it's always good to create interfaces in these cases to describe the desired functionality without being coupled to a specific class implementation. Also, interfaces don't cast to the base class under the hood, they only cast to the interface itself, thus loading only the required functions in memory and not the entire class
@Dysil
@Dysil 24 күн бұрын
might be a stupid question but could replacing the gameInstance affect or break anything i just wanna be cautious.
@AliElZoheiry
@AliElZoheiry 20 күн бұрын
Nope, because we are not replacing it, we are "extending" it. Meaning we create a child class of the GameInstance, that by default does everything the parent GameInstance class does, but we add more functionality to it. So unless the new functionality overrides the existing one, then there's nothing to worry about
@Leonardo-zb6ho
@Leonardo-zb6ho 2 ай бұрын
Hello Ali, it appears that the system doesn't save my player's health and rotation, why? Does that have something to do with the first person character (which is the one I'm using)?
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
If you have a health variable and a rotation variable that when changed affect the player, then saving and loading them should be the same as shown in the tutorial, as long as you have them in the PlayerSave struct, and you are updating and reading from that struct correctly, then it should work
@erook2019
@erook2019 Ай бұрын
Someone helped me solve this issue just now, if it is the same as mine... Add a Delay node of 0.1 sec before your checkpoint or the thing that is saving your data.
@vladiktomil434
@vladiktomil434 18 күн бұрын
Does anyone know how I could deactivate a cinematic at the beginning of the game with this logic, if I add it from BeginPlay of the Level for example?
@AliElZoheiry
@AliElZoheiry 15 күн бұрын
Hey there! When a player sees a cinematic for the first time, you can then save a variable that signals that this specific cinematic has been viewed, and then next time before playing it, check in the loaded data if it was viewed before or not, and if so, skip it
@vladiktomil434
@vladiktomil434 15 күн бұрын
@@AliElZoheiry Thank you very much bro, in the end I managed to do it in a somewhat crappy way that works by touching the save trigger, but if I don't move the character and it doesn't save, it starts again. I'll give it more thought to get exactly what I want. Have a good day and thanks for answering.
@darkwolf780
@darkwolf780 Ай бұрын
Maybe I'm stupid but how would you implement this to a Multiplayer game and loading the player when the click play from a main menu?
@AliElZoheiry
@AliElZoheiry Ай бұрын
Depends on what you're saving and loading and from where as well. But typically, online games store save data in a database, that is structured to store data specific to the logged in account, but it all really depends on what you want to save
@IlkinKhalilovXMI
@IlkinKhalilovXMI 3 ай бұрын
Hello. How can i spawn many child actors from tranform. For example there is a master furniture actor and i saved table,tv and sofa. How can i spawn theese?
@AliElZoheiry
@AliElZoheiry 3 ай бұрын
Hey there. Just like I mentioned in the video, you need to check what information do you need to know to be able to respawn these items? is the furniture actor enough? do you need to know what variables were inside that actor? anything you need to know to respawn the actors, you can create a structure for it, and save that structure in your GameSave object
@IlkinKhalilovXMI
@IlkinKhalilovXMI 3 ай бұрын
@@AliElZoheiry I just found how to do. I created save data for every single furniture like save cube. It is longer way but works perfect. Your tutorial is the most perfect and complete tutorial i have ever seen. I could easily modify it. Thanks
@un1nv1t3d5
@un1nv1t3d5 2 ай бұрын
could you show us how to integrate this into a main menu so that we could select which save?
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
Sure thing! I'll add that to my list of upcoming video topics. Thanks for the suggestion!
@un1nv1t3d5
@un1nv1t3d5 2 ай бұрын
​@@AliElZoheiry thanks
@inspiredexpired9137
@inspiredexpired9137 29 күн бұрын
But if you don't want the life bar saved as I want it to be spawn in at a save point full life if you restart your game. Can I just opt out of that portion? It's a lengthy tutorial so before I do it I just wanted to know. Having limited knowledge. I'm hoping by skipping that portion won't mess up my blueprints. I've also three characters to select from that's working properly I also don't want it to trouble that so I just made a backup.
@inspiredexpired9137
@inspiredexpired9137 29 күн бұрын
Also have a menu already that says start. When i hit start it starts with no character but if I selected a character go back to menu hit start it does apply the last character selected. I want to save no matter what third person I've selected will this kinda cover that as well?
@AliElZoheiry
@AliElZoheiry 27 күн бұрын
Hey there! I suggest watching the whole tutorial, because it's not about saving specific data types, it's about creating a save system in general. I can't promise that if you skip certain parts everything will still work correctly.
@WiseThoughts3
@WiseThoughts3 5 ай бұрын
Hi can i implement this to the ai series project ? And also can i migrate the whole system to another project
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
Depends on what you want to save in the AI project. So just follow the steps here. Think about the information you want to save, the data structure it will be stored in. Then create your SaveGame class. You can migrate the interface and the game instance class, and just delete the "SavePlayer" & "SaveCube" and create your own custom functions. But the rest is reusable
@Urkoth
@Urkoth Ай бұрын
What if we had more classes than just cubes? If we had spheres and we copy pasted cube nodes in blueprints while changing get all actors of class to Spheres, it just wouldn't work... At least from my experience. Any way to approach this to work?
@AliElZoheiry
@AliElZoheiry Ай бұрын
One approach to handle this is to use a base class that both cubes and spheres inherit from. You can create a common parent class for cubes and spheres, and then use "Get All Actors of Class" with the parent class. This way, you can access both cube and sphere instances through the parent class reference and differentiate between them based on their specific properties or tags. This approach helps in dealing with multiple classes in a more structured and flexible manner within Blueprints. That said, this will all highly depend on the structure of your game classes
@Urkoth
@Urkoth Ай бұрын
​@@AliElZoheiry I do have a master class - master pickup actor. Will probably try it again. I also actually managed to save actor transform through bed that I placed as block with collision sphere with saving - just like in minecraft. Unfortunately, had to delete it in the end because placing bed with the collision that saves caused errors that prevented packaging the game. Saving can be troublesome...
@okynomy7681
@okynomy7681 Ай бұрын
Hi! This a great tutorial, very well structured and explained! 31:04 you spawn at the second checkpoint but for me, I always respawn at the PlayerStart... If i delete the PlayerStart, it's working but it's not the solution. Do you have a hint for me about that???
@AliElZoheiry
@AliElZoheiry Ай бұрын
Hey there! The only thing I can think of is that you're moving the player to the loaded location before they actually spawn, then once they spawn, their location is overridden by the playerStart. Though I am not sure how that would happen, since you're probably calling the SetActorLocation in the BeginPlay
@okynomy7681
@okynomy7681 Ай бұрын
@@AliElZoheiry Hi! Thanks for taking the time to answer. Really appreciate it! I made a brand new project and follow carefully, step by step, your video from the 1st second to 31:04 and It's happening again, I respawn at the PlayerStart, I try to wait before reaching the BP_Checkpoint and wait a little before ending the simulation and launching it again but... same result. What do you mean by: "since you're probably calling the SetActorLocation in the BeginPlay" I haven't set this one. I have to set it in the BP_ThirdPersonCharacter?
@AliElZoheiry
@AliElZoheiry Ай бұрын
@@okynomy7681 I was referring to where we call "UserPlayerSave" function, because this function takes the loaded player location and sets the actor location based on that. So this function should be called on BeginPlay in the ThirdPersonCharacter. Try even adding a "delay until next tick" function before calling it and see if it helps
@okynomy7681
@okynomy7681 Ай бұрын
@@AliElZoheiry Yes, I have the function called on the BeginPlay. I added the node "delay until the next tick" before the game data node as you suggested and it still not working... I am on Unreal 5.3.1, are you on this version too?
@okynomy7681
@okynomy7681 16 күн бұрын
II fI finally found why I couldn't save my character's position, I had forgotten to give a value to the slotname variable as you explain in 12:23 😅
@xskodemedia746
@xskodemedia746 5 ай бұрын
not trying to be picky but it's hard to seen some of this stuff are you able to record in atlease 2k resolution? it's a good video btw
@AliElZoheiry
@AliElZoheiry 5 ай бұрын
I take it you have a 4k monitor then :D? 1080p on 4k monitors is indeed pretty shitty, I'll look into it ;)
@xskodemedia746
@xskodemedia746 5 ай бұрын
thats awesome thanks!@@AliElZoheiry
@ClutchyKingy
@ClutchyKingy 2 ай бұрын
I have a problem not with the code the code works fine the problem I have is the save file the save works I spawn where I last saved but I don’t get the save games file in the project folder
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
If you are running a development build of the game then the save file will also be in the savedGames folder (unless you changed it from a configuration somewhere) or you are using a production build of your game, but you would definitely know if you were
@Smokusek
@Smokusek 2 ай бұрын
how to save player data to new save? when i try to set saveName in my mainmenu it creates new save but loads data from the original one and whenever i save the game it only works with the original named saveName
@AliElZoheiry
@AliElZoheiry 2 ай бұрын
That's what the "Save slot" is used for, just make sure to give it a unique name, both when saving and loading
@Smokusek
@Smokusek 2 ай бұрын
​@@AliElZoheiry ok thank you i get it why it didnt work, but what i don't know now is how to set the slotName to load whatever slot i need to, in my project i open the game on MainMenuMap and there i got a button that opens ThirdPersonMap. When i set manually SlotName in BP_GameInstance it loads/saves correctly whatever i type in there but when I try to add "set SlotName" to my main menu button it does not work (by casting to BP_GameInstance), could you please tell me what is the right way to set SlotName?
@yurenadiazperez
@yurenadiazperez 4 ай бұрын
Hey! Very well video! But when i save the game in a level 1, when i load the game in a other level 2, the character fall in to empty (but without bluprint errors). And i have a widget for life, and it repeats when i load game. Can you help me with this?? Thanks❤️❤️❤️
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey there, thank you, glad you enjoyed it! It sounds like you're saving the player location in one level, then in another level you're loading that same location which is not a valid location in that new level. Make sure that if you save the player location in a specific level, to remove that when the player goes to a new level, because, of course, location is only specific to a certain level.
@user-fm9zo5le2v
@user-fm9zo5le2v 4 ай бұрын
Great tutorial. Unfortunately, once you use open level, which you have to at some point, this doesn't work anymore.
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
Hey, thank you 🙏 regarding your issue, what do you mean it doesn't work anymore when you open a level?
@user-fm9zo5le2v
@user-fm9zo5le2v 4 ай бұрын
@@AliElZoheiry If you try to make a quicksave/quickload (F5/F9) system, and on "load" you open level (your last saved level) in GI for example, followed by interface messaging the player character to apply the saved data to itself, it doesn't actually do it. I think the code beyond open level in the GI still runs, but maybe there is no player character object instantiated at that point? Just guessing.
@AliElZoheiry
@AliElZoheiry 4 ай бұрын
@@user-fm9zo5le2v The GI persists throughout different levels, because it's a single instance, so it should still contain the load file no problem. Unless you are trying to do async loading, then you have to follow a different approach which I explained in the extended version of this tutorial on my Patreon
The Power of Git in Unreal Engine: a Step-by-Step Guide | UE5
18:48
The Most Common Mistake Beginners Make in Unreal Engine | UE5
12:17
Ali Elzoheiry
Рет қаралды 88 М.
100❤️
00:20
Nonomen ノノメン
Рет қаралды 57 МЛН
狼来了的故事你们听过吗?#天使 #小丑 #超人不会飞
00:42
超人不会飞
Рет қаралды 64 МЛН
[柴犬ASMR]曼玉Manyu&小白Bai 毛发护理Spa asmr
01:00
是曼玉不是鳗鱼
Рет қаралды 52 МЛН
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 79 МЛН
I solved Unreal Engine's Package Size Problem...
14:35
Cobra Code
Рет қаралды 54 М.
Why Interfaces in Unreal C++ are so important
3:18
Scripted Adventure
Рет қаралды 5 М.
Creating the ultimate save system - Unreal Engine 5
51:30
LeafBranchGames
Рет қаралды 12 М.
Unreal Debugging Tools I Wish I knew earlier!
21:36
AmrMakesGames
Рет қаралды 3,2 М.
Why Dependencies are Bad and How To Avoid Them In Unreal Engine | UE5
26:40
10 Unreal Engine 5 PLUGINS I can't live without!
9:37
Cinecom.net
Рет қаралды 450 М.
How to Optimize Performance in Unreal Engine 5
17:40
Nu Makes Games
Рет қаралды 16 М.
How to create Modular and Scalable UI systems in Unreal Engine
19:15
I went through ALL Unreal Engine Plugins, here is what I found
36:35
ЖИЗНЬ ЮТУБЕРА СПУСТЯ 4 ГОДА!
22:39
EdisonPts
Рет қаралды 1,5 МЛН