Happy new year!
I’ve been sick so this blog post has been delayed for a week. The save/load/system is mostly complete. More work will be needed but during the coming weeks I will be working on other parts of the project for the most part.
The original goal was centered around making the save system as simple, modular and lightweight as possible. Unreal blueprints has proven harder than anticipated in making the system simple. Particularly difficult was how to save pages as they should not reappear after loading the game as other objects. I finally settled on having a separate save game for which pages has been picked up.
Simplifying pickups.
The pickup system was simplified with only the page system still using the call to save/load calls. The only time when the save/load system needs to know when the object is changed is when it saves. It also makes the pickups simpler.

The more complex system is still in use for the pages in order to ensure they does not reappear in the level after the player has picked them up.
Saving page system
As the page system needs to be saved at extra times and be independent of normal save games Therefore the page system has its own save/load functions and own file. The load function makes certain to keep pages picked up and the save function is called whenever a page is picked up.
Page system
The page system has earlier worked by the same visual feedback system used by the doors. It outputs a message relevant for the object a certain time that fades. It is a function for inventory as it is displayed by the same widget used to display batteries and keys.

The flashlight was added by Max and helps in viewing objects. It does not use batteries currently. Also note that the screenshot is from my test level. Max and Erik has been working on level design and I do not want to spoil anything.
The new system is centered around showing a page with page turners on both sides allowing the player to scroll through the pages. Instead of just having images in an array the page system will use the same background image for all the pages and instead store the text in an array.
One of the hardest parts in implementing this was making a function in blueprints which loops through the array until it finds a page picked up or is back at beginning.
Eventually I settled for a function which uses the modulo function to handle increases above maximum and a branch to check if it goes below zero. The function keeps on going until it reaches an active branch or is back at beginning.

Saving AI
I have been working together with Dennis in making the AI system save AI variables. This was accomplished by creating name variables for the specific variable names used by the blackboard. These are used both for saving and loading values from the blackboard.

0 comments