Save System - Infinite Saves and Build Bugs
Author: Zak Levine
Date: 3/10/2023
A necessity for every game is the ability to save. I implemented a save system for this build that auto-saves after the player clears a room or when the user opens a chest. I also added a button for the user to save their location and stats when they are not currently in a locked room. Another feature is the skill tree that keeps when users click confirm on the skills window. There were many issues that I faced when making this.
One prominent feature I enjoy is the ability to make as many saves as you want. Unreal does not have a node built-in that gets all the saved files so that you can show the user. For this, I made a blueprint node called Read File By Extension. It is a c++ function that takes in a path and an extension; then, it returns a Farray of Fstrings paths with that extension at the path. I also altered it to only return the file's name by removing the start to the final '/' and the extension. Using this, I could display all the current saves to the user and have them select which one to play. The green button is the currently selected save.
One major issue occurred during the making of the build. Multiple features that worked correctly in the debugger either malfunctioned or stopped working. For instance, I gathered the save names through a different Save Game file I created. I had issues using a game instance before, which is why I decided on this method, but after some research, I found that others had similar problems using this method, so I switched to using a game instance to store a get the Current Save Name. Another issue was the node Get Actor of Class that I was using to get the player to call a save function that saves everything the player needs to keep. The node naturally worked in the debugger but did not work in the build, so I had to get and store the player's reference on each room object. This change worked fine for the build, but some bugs need fixing since I did not have much time to test it.
Another issue during testing was with the game loop and multiple saves. The dungeon generated itself during the constructor; however, by changing the seed of the dungeon, the constructor needed to be recalled and required the dungeon to be rebuilt. To counter this, I moved the dungeon construction script into a function I call at the start of the beginning play, and I added a little delay to other components, like creating the rooms and doors that need the dungeon to work. The delay also worked for the build but needed to be altered slightly.
Slimegeon
Status | In development |
Author | zaklev |
More posts
- Finalizing the Skill Trees and the Missile TurtleMay 25, 2023
- Creating Modular UIMay 25, 2023
- Sword Reveal Over TimeMay 25, 2023
- Bug Fixes and CinematicsMay 25, 2023
- Fixing Pawn JittersMay 18, 2023
- Reworking the skill treesMay 18, 2023
- Reorder Save List by Date Last PlayedMay 18, 2023
- Possession, Lock-On Blips, and YetiMay 18, 2023
- Loading Screen and Lock On AdjustmentsMay 11, 2023
- Snowballs Destructive MeshMay 11, 2023
Leave a comment
Log in with itch.io to leave a comment.