Hey guys, I find my game experiences a noticeable hitch when the game is saved. Therefore, I decided to move the “save game to slot” to the background thread. However, I had some problems when doing so.
The function works fine on the game thread. However, it seems did not work on the background thread. That’s how I did that:
I checked the SaveGameObject.sav under the saved directory, and the size is just 2kb, which equals to nothing. When I use the game thread to save, it’s about 34mb. Too weird lol
yeah SaveGameToSlot has to run on game thread, calling it from a background thread just silently does nothing. thats why your bg version never writes
AsyncSaveGameToSlot helps with file io but LoadGameFromMemory / serialize still hits game thread so big saves still hitch a bit. keep struct lean or chunk arrays if its large