I started this week by implementing thumbnails for game saves. For this I needed to override the
getSavegameThumbnail method, since the default one didn’t work with an OpenGL context. After that, I encountered a problem with the way the thumbnail looked in ScummVM. Initially, I thought it was a problem with my implementation of the above method, but after playing a bit, I realized it was an effect triggered by the game. To fix it I moved the call to save the game’s state after the effect had finished.
After that I worked on other miscellaneous tasks to better integrate saves in ScummVM, and I also replaced the config file that the game would use to store the user’s settings. This included all the settings that could be changed in the menu, but also other parameters, like the starting map or a toggle skip the start sequence or the menu. I decided to keep most settings since they could be useful.
Next, I decided to play the game to see if everything was working correctly. In the third level I ran into audio problems. The issue was that the second time the map loaded, a sound which should have terminated, started playing on loop. After a while I discovered this was caused by the fix I described earlier for the thumbnails. The problem was that, in the original, the save would be made before the end of a timer which would trigger a script function, which, in turn, would fade out the problematic sound. After the fix, the save was triggered after the sound started fading, and since the state of the sound entity was not saved, when loaded again, it would start normally but never stop. For now, my solution was to save the state of the sound, but I want to test it on all the levels before declaring the problem solved.
After playing more of the game, about a third of the way through, I encountered the same problem I described above, same sound too, thought this time it was a different issue. The problem was that the scripting library was missing an add-on that allowed for the creation of arrays, and so it wouldn’t compile the script for the level where the problem occurred .
One more issue with audio remains, thought this one is not related to scripts, since the sound is coming from the interaction of physics objects. I think the problem is probably coming from the sound classes which I worked on.
Next week I’ll keep making my way through the game, fixing the problems that I find, and after that start cleaning things up.
Thanks for reading.