GSOC 2019 Summary

Project description

During GSoC 2019, I was working on adding support for original versions of Red Comrades 1: Save The Galaxy (1998) and Red Comrades 2 : For the Great Justice (1999) games developed by S.K.I.F.

 

Goals achieved

Red Comrades Engine:

Pull Request

Engine branch

Red Comrades Demo is fully supported.

Red Comrades 1: Save The Galaxy (1998) and Red Comrades 2 : For the Great Justice (1999) are runnable, but are bugged due to no implementation of walking system.

During reversing I have encountered problem with walking system, because it is very large and complex. It uses more than 30 functions. For comparison, the dialog bytecode interpreter uses only 17 functions.

Advantages over original engine:

  • Low CPU usage. The original engine doesn’t have delay after each frame despite the fact that dirty rectangles are implemented in it.
  • All advantages which ScummVm offers(scaling, cross-platform, etc)

ScummVM’s library:

During GSOC I have improved INI reader class in ScummVM.

Future work

  • Make games fully playable
  • Maintain Red Comrades engine during its testing period
  • Add another engine to ScummVM

Code

The code for Red Comrades Engine is in the repo:

Engine branch

The commits that I made:

Commits

Week 12

This week I have been preparing engine to merge with ScummVm’s main tree and reversing walking system.

 

Some ini files in games are invalid like this:

Also ini files have CP-1251 encoding, which makes them unreadeable by ScummVm’s ini class. So I have created pull requests(12) to fix those issues.

Also, I have implemented saving/loading system.

Saves in those games have such structure:

Considering the walking system, I continue to reverse it. I have encountered some problems with it, because it is highly connected with other parts of the engine, so I  review other parts and add things that I have missed earlier.

But this is only the one thing that has left. After implementing it the engine should be playable.

I will create the engine pull request when the pull requests concerning ini reader will be accepted.

Week 11

This week, I have been implementing:

 

  1. Map interface
  2. Events handling
  3. A lot of opcodes

For now, there is only left to implement about 10 opcodes. Most of them are related to the walking system.

After implementing walking system, along with saving system the games should be playable with some bugs.

I have recorded some gifs to show the current state of the engine.

 

 

Week 10

This week I have been ending reveresing of the engine.

 

For now only walking system is left to reverse. Considering its complexity I will leave it until I implement things that have much more priority.

What’s left to implement:

  • Map interface
  • Some opcodes
  • Sequence interface
  • Saving/Loading

Given that I know how these things work, I will implement them very fast to the end of GSOC.

Currently engine can play demo without any problem, execute intro of the first game, probably the second game intro can also be excecuted, but I haven’t checked it.