Save states (serialization)
I'm a bit confused on whether Lutro support for save states/serialization is working or not. Looking at the examples and the Lutro source code, seems that serialization is implemented, but on RetroArch/Libretro it is disabled.
I'm porting a love2d game to Lutro, and save states would be great. Thanks
You unfortunately have to serialize them yourself. For example: https://github.com/kivutar/lutro-bobble/blob/master/main.lua#L200-L344
You unfortunately have to serialize them yourself. For example: https://github.com/kivutar/lutro-bobble/blob/master/main.lua#L200-L344
Thanks, @RobLoach ! I've already implemented serialization hooks, but when I trigger a save state within RetroArch, I'm receiving an error: "Core does not support save states"
How can I test my serialization functions?
This commit has probably solved the issue, but before that one had to go to Settings - Core and set "Bypass Core Info Save States Features" to On.
This is still required to enable netplay, because netplay is only allowed with savestate_features = "deterministic" ("serialized" is not enough). If I understood well, the only issue with "serialized" is the non-reproducibility of random numbers, but one can easily implement a very basic random number generator, like the LCG, and serialize the current state of the generator. This should allow for the synchronization of random numbers between the players.