Reorder Save List by Date Last Played
Date: May 18, 2023
A simple but very convenient functionality is ordering saves by date. To create this functionality, I made two C++ functions to reorder the saves correctly. I encountered two main issues when developing this functionality: a Blueprint save game and unreliable data types.
To start this, I made a blue printable function that is callable within the blueprint. Originally I wanted to make the procedure call the save game and pull the data; however, due to creating the save game blueprint, I opted to take a map as the parameter instead. The map stored the name as the key and the date as the value. The function would create three arrays. I made the first two arrays from both lists in the map and returned the final list at the end of the operation. Before returning the reordered list, I called a recursive function that took all three lists as referenced parameters.
The recursive function would loop through the dates. It compares all the dates and finds the oldest date. Then it pushed the name of the most recent date to the reordered list. It removes the name and date from the original arrays and recalls the function. The end condition of the recursive function is when the original name array is empty. In the end, the list is ordered from oldest to newest, which gets reversed because the first save button is made and then pushed, so the latest save ends up being on the top of the saves. After exiting the recursive function, it returns the reordered list to the original and blueprint parts.
Overall, the functionality is quite simple and could be optimized more using a C++ Save Game, but it offers a valuable and necessary option to the User Experience.
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
- 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.