Reorder Save List by Date Last Played



Author: Zak Levine

Date:  May 18, 2023

The save list is ordered by how it is read in.

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.

The saves are ordered by their Latest Saved Date.

Leave a comment

Log in with itch.io to leave a comment.