SAGA2 − GSoC Summary

Hello. My name is Yuri Guimaraes (nick: a-yyg), a student at ScummVM for the Google Summer of Code 2021.

Starting on May 17th and continuing up to August 17th, I’ve made about 500 commits to the master branch of the ScummVM repository, most of which focused on implementing the SAGA2 engine within ScummVM, an engine made for the game Faery Tale Adventure II.

The development during GSoC started on commit 62e5f32dd8ff36e63e5d5be598bd352cf745a8b6 and ended on commit 994ac18c52785e69213e2312f435f73fa76ef75b.

You can see all of the commits during this timeframe HERE. (Also linked at the bottom of the page in case of hyperlink failures.)

The development is not over, but the game (FTA2) is playable and completable (one can acquire all of the endings).

Here is a list of milestones:

  • Made the code compilable within ScummVM:
    • Converted custom error/warning methods to ScummVM’s error/warning methods.
    • Converted FILE usage to OSystem’s Common::File.
    • Replaced OS-specific drawing code with OSystem’s drawing methods.
    • Replaced proprietary audio code with OSystem’s audio interface.
    • Replaced custom input scheme with OSystem’s input interface.
  • Made the code more portable:
    • Removed dangerous pointer arithmetic designs.
    • Converted non-endian-portable code to be endian-portable.
    • Fixed various portability related warnings, such as global constructors.
    • Made the save system be compatible with the original.
  • Integrated it with other ScummVM internals:
    • Saved option values with ConfMan.
    • Integrated the save system with ScummVM’s so that one can load a save from the launcher.
    • Implemented various console commands to ease debugging.
  • Removed dead code.

I should thank sev, my mentor for this project, and NMIError for their contributions to the audio system and various other contributors for fixing various warnings and letting me know when the builbot broke. Additionally, sev helped immensely with debugging, writing the skeleton code for many of the engine parts I was unfamiliar with, fixing compilation warnings, and fixing minor errors caught by the group’s static analysis tool, Coverity. I should also thank him for writing the sprite unpacking and other assembly routines.

Thanks to the above contributions, I was able to achieve the original project goals set out for SAGA2. However, there is still plenty of work left to do. Below are a few examples:

  • Further playtesting.
    • Debug and fix portability issues on several platforms.
    • Debug the original executable binary to fix some of the issues still present (e.g. limit of Tasks being reached), as well as to extract still undefined methods.
  • Refactor the codebase.
    • Rename the variables so they conform to ScummVM’s naming conventions.
    • Get rid of global/static variables.
    • Reduce code complexity by making use of more of ScummVM’s classes.
  • Implement more MetaEngine features.
    • e.g. Return-To-Launcher, Subtitle Options…

With the contribution everyone has granted to this project, SAGA2 will hopefully soon be able to stand as a mature engine. It currently only supports FTA2 on a limited number of devices, but some of the code may serve as a foundation for other games developed by The Dreamers Guild, such as Dinotopia.


Link to the commits: https://github.com/scummvm/scummvm/commits/master/engines/saga2?since=2021-05-17&until=2021-08-17

Note: You need to possess a copy of the original game’s files to test the engine.


Leave a Reply

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