This week was a little haywire. It involved a lot. of debugging and getting a deeper understand of the engine.
Compiling the original Engine.
For the past few weeks we were stuck on problems that were getting very hard to debug. Hence we decided that it would be helpful for us to compile the original engine sources. With this we could compare the two using breakpoints and debug messages. I tried to compile the original but it was taking way to long for me to do so. Sev was kind enough to do it for me and compare the two versions we had.
Once we got the original to work, we could compare the two and realised that there was an error while reading the qml file. Once we fixed the issue we were able to render the next frame.
In the mean time I implemented a placeholder mini game for the engine to move forward. However to our surprise our struggles weren’t over yet. Shortly we ran into a crash that was again very hard to solve. It again took us quite some time to debut this issue (again sev came to rescue over here). I will cut the story short here and jump straight to the conclusion. The issue was that were trying to launch the wrong target. For all these 4 weeks we were working on shveik, however it was using several QDA files of the version 105, but we had the sources for 104. Essentially we were not going to support that game, and we had to move on with a different one.
Marvellous Mice Adventures: Meeting Sea Rat
We chose a different game target to test our engine. The game we decided to go ahead with was 3mice1, since it was the closest to sheik’s release date. We managed to launch the game, and bravo it just worked perfectly fine. There were no graphical glitches, whatsoever. However the challenge that still remained was the previous games didn’t really launch properly inside of ScummVM. We had an enum definition in our codebase that was used to read tagIDs of the qml file that was being read. Over the course of the development of the engine, they had inserted new tagIDs at several points, leading to different versions of the enum. Hence much older games, like pilots3d or pilots3 had issues while launching them. We solve this problem by dynamically generating our tagMap and then searching for different values there.
One more feature that we implemented this week was to dump the data to an xml file. What the earlier engine did was that once it loaded the qml file, it dumped all that data into an xml file. This was being called from the editor, however since we were not porting the editor we wanted to call this when --dump-scripts
would be passed as command line arguments. This would help us visually verify from the xml if we were reading the qml file properly or not.
Throughout the week I also made sporadic progress in areas, like save/load game and sound. However none of those things are complete. In the coming week I would be hopeful of making more concrete progress as next week would mark the half mark for GSoC.
Leave a Reply