Categories
Uncategorized

Working on save game support

Hi all, past week’s progress has also been slow due to health issues. However, I have started the work on adding savegame support.

The rationale behind this step was that it would help cover more stages/levels during tests, since till now, I have not tested past stage 3. Once the savegame implementation is done, I and my mentors would be able to create savegames at different stages which we could share and test if every stage is working as expected.

Coming to the topic of CRAB’s save system, it works by dumping the state of all the game objects to an XML file which is later read to instantiate the various objects according to the values when the savefile is loaded. This includes dialogues of various characters present in the level. I found this to be weird because if I had to design a save system, I would only save the level number and when that would be loaded, the character dialogues would get loaded in as well.

Anyways, I was able to port the save system to be compatible with ScummVM but immediately there were some noticeable problems.

The very first problem was that font rendering in the loading menu is broken due to some reason(The glyphs for some strings are not rendered properly)

Broken font rendering

Next, due to the way keymapper has been implemented, when inputting the save name, certain keys get skipped. For example, when typing in “kartik” only “kark” gets processed since both “T” and “I” are bound to some game actions.

To remedy these bugs, I decided that I would simply replace both the save menu and load menu with ScummVM’s GMM load/save menus. This required a lot of changes to the save system but I was able to get it done. Pressing the save/load button would now open ScummVM’s load/save menus and not the original ones.

Improved load/save menus

While this does work as expected, my mentors want me to keep the original menus so that the user can use the original menus if they wish to do so.

This is all that I was able to accomplish this week. While savegames do work, a lot of changes still need to be made before it can be called complete. Thanks for reading!

PS: On a personal note, I would like to dedicate all the further work and the work till now to my grandmother whom I lost this week. I hope I continue to make you proud!

Leave a Reply

Your email address will not be published. Required fields are marked *