Hi everybody! :)
My last week's progress is mainly centered around the save and load system. I had a couple of difficulties, but now CGE2 engine supports almost every Advanced Engine Features. I only left out "Return to Launcher" support, since the engine still have a lot of memory leak issues (even through I managed to solve a couple of them) needed to be fixed before that.
So as I said, now it's possible to load a gamestate via the launcher, or even do saving or loading in-game. I plan to also implement an autosave functionality, similar to the one implemented in CGE1, but for now it works and that's totally enough for debugging and the translation works of Arnaud.
I've got a couple of hardships during the implementation of this subsystem, but ScummVM's built-in Common::Serializer class helped me a lot and spared me a great deal of time by hiding the actual stream operations behind an abstract interface. Since the original game only supports saving when exiting the game, and loading when starting it, I had to make so modifications in the engine itself to make it possible to save/load anytime during gameplay. But knowing the internal workings of the engine, it was quite straightforward. The hardest part was to rework Spare and the way it's used, so now it's not just a temporary container for some of the sprites in the game, but a big catalog, which stores every Sprite used by the engine, all the time, so most of the synchronization work is to keep Spare up to date.
Otherwise, I mostly spent my time with annoying and hard to find bugfixes like this miracle.
During the past week, Arnaud went on a translation-frenzy. :D Thanks to him, almost all of the scenes of the game (Warning, spoiler alert!) are reachable/finishable. I just can't express my gratitude toward him. :)
My plans for the upcoming week is more bugfixes and even more taking care of various Valgrind errors, provided generously by David, what I am still really thankful for. :)
See you soon!
Showing posts with label saving/loading. Show all posts
Showing posts with label saving/loading. Show all posts
Tuesday, July 8, 2014
Monday, June 30, 2014
A bit of vacation and the Advanced Detector
Hey all! :)
During the last week, I spent a few days on vacation, so I haven't really progressed much with the engine. Truth to be told, I am still on time regarding my schedule, so everything is okay.
Besides that, Arnaud progressed a great deal with the translation, and with the implementation of a few more opcodes, we were able to unlock a couple of new scenes in the game. Here are some pictures of them:
Now, if I count it correctly, we have almost 10 playable scenes of the game, most of them fully translated. That's a quite good number if you take into account that the game has about 28 scenes in all. :)
Considering the advice of David (digitall), I also added a fallback detection for the English translation, so we don't have to modify gameDescriptions[] every time Aranud comes up with a new version of the translation.
In a nutshell, it's algorithm is very primitive: it checks for a "lang.eng" dummy file. If it finds it, the engine detects the game's data files as the WIP English translation. Of course, it's just a temporary solution, only used during the development. The cool thing is, it was VERY easy to implement, thanks to the great Advanced Detector what ScummVM provides. I only had to implement fallbackDetect(), and that's all, ScummVM takes care of everything else.
We also decided that the bug in the pathfinding can wait. It's absolutely not a showstopper, since you can interact with every sprite on the screen what needed to proceed with the game, it only blocks the player to wander around with our two heroes on certain screens. We postpone it for later, to be implemented with other rather "cosmetic" features.
This week, I am working on the save/load system, so we can test and translate the game much effectively and swiftly. Sadly, my parents are moving to a new house during these days, and I have to help them a lot, which consumes a lot of energy and time of mine. Nevertheless, I don't fear that will slow my progress significantly
Right after that, I'll have a pretty long list of Valgrind warnings to take care of as well. Great thanks again to David for providing me with these information, and helping me so much! :)
See you next time! (Hopefully with a working save/load system, and with much less memory leaks. :D)
During the last week, I spent a few days on vacation, so I haven't really progressed much with the engine. Truth to be told, I am still on time regarding my schedule, so everything is okay.
Besides that, Arnaud progressed a great deal with the translation, and with the implementation of a few more opcodes, we were able to unlock a couple of new scenes in the game. Here are some pictures of them:
Now, if I count it correctly, we have almost 10 playable scenes of the game, most of them fully translated. That's a quite good number if you take into account that the game has about 28 scenes in all. :)
Considering the advice of David (digitall), I also added a fallback detection for the English translation, so we don't have to modify gameDescriptions[] every time Aranud comes up with a new version of the translation.
In a nutshell, it's algorithm is very primitive: it checks for a "lang.eng" dummy file. If it finds it, the engine detects the game's data files as the WIP English translation. Of course, it's just a temporary solution, only used during the development. The cool thing is, it was VERY easy to implement, thanks to the great Advanced Detector what ScummVM provides. I only had to implement fallbackDetect(), and that's all, ScummVM takes care of everything else.
We also decided that the bug in the pathfinding can wait. It's absolutely not a showstopper, since you can interact with every sprite on the screen what needed to proceed with the game, it only blocks the player to wander around with our two heroes on certain screens. We postpone it for later, to be implemented with other rather "cosmetic" features.
This week, I am working on the save/load system, so we can test and translate the game much effectively and swiftly. Sadly, my parents are moving to a new house during these days, and I have to help them a lot, which consumes a lot of energy and time of mine. Nevertheless, I don't fear that will slow my progress significantly
Right after that, I'll have a pretty long list of Valgrind warnings to take care of as well. Great thanks again to David for providing me with these information, and helping me so much! :)
See you next time! (Hopefully with a working save/load system, and with much less memory leaks. :D)
Tuesday, August 20, 2013
Saving/loading and a little mouse
This screenshot not so flashy as my previous ones, and don't show you much of the actual game, but I think it still looks pretty decent. :)
After I arrived from my short vacation, my plans were precise: first implement the handling of the mouse, and then the drop-down menu. With a little purposeful nudging from Strangerke, I decided he is right again when he advised me to implement the saving and loading in the engine right after the mouse, so I can make the game completable as soon as possible. I took his advise and you can see the product of my work in the picture. True that the drop-down menu is still not working, but I think it can wait a bit more.As I mentioned before, I started with the mouse. In truth, there wasn't much to do since the game doesn't have a pathfinding system or anything like that. Avvy just blindly follows the mouse on the screen until he collides with a "magical" line, or if you tell him to stop. In fact there are a lot of ways to do so: you can control Avalot with the keyboard, the mouse, and even with the little compass on the left part of the toolbar on the bottom. Practically, that covers almost everything I had to do with the mouse: moving around the main character with the help of it, accept scrolls by clicking on the screen, replace the cursor of the parser by clicking on the desired position and activate functions by clicking on their icon on the toolbar. These are implemented in Lucerna::checkclick() which you can check out here. Lucerna::verte() is the function responsible for guiding Avvy around on the screen.
The second and more tricky part of my week was spent with the saving/loading system. After a couple of hours of killing Strangerke's and fuzzie's brains with my stupid questions and fighting myself through these tutorials and reading a lot of code in Hugo and Mortvielle, I finally got a solid footing where I could start from. Practically, I copied or mimicked a lot of code in Hugo regarding the use of the GUI, but the implementation of the actual saving and loading came from Mortvielle by the use of Common::Serializer. This precious little thing gave me a lot of help during the implementation which was mostly done in AvalancheEngine::synchronize() by giving me a very pure and simple interface to work with.
After that I implemented various advanced engine features such as loading from the launcher and the displaying of thumbnails on the save and load screens. My last concern was adding some version control to the system and here we are: all working and done!
By the way, ScummVM has a very convenient and friendly API for developers to include these advanced features, and it was quite a pleasure to work with it as you may see for yourself if you take a look at the tutorials I mentioned before.
Next aim: a completable game. See you soon! ;)
Labels:
Avalanche,
mouse,
saving/loading
Subscribe to:
Posts (Atom)
