Categories
Uncategorized

GSoC summary and final report

Hi all, my name is Kartik Agarwala(hax0kartik) and in the past three months, I worked as a GSoC student under the mentorship of Eugene Sandulenko(sev) and Strangerke with ScummVM. The main focus of my project was to integrate the CRAB engine, developed by Pyrodactyl Games, into ScummVM. This blog serves as a final report of what I accomplished in this three-month period.

What’s been done?

The original milestones as per the project proposal were:

  1. The skeleton engine with some of the main classes is compilable within ScummVM.
  2. Skeleton engine is extended to fully include the first component. This includes loading and parsing XML files.
  3. Work on the graphics component.
  4. Get Unrest into a somewhat working state by integrating the essential components.
  5. All the components are integrated aside from audio.
  6. Integrate audio and ensure that the game is playable.

All of these milestones have been met.

CRAB has been fully integrated into ScummVM and Unrest is playable from start to end.

My changes were merged in the main ScummVM branch with PR #5229. You can also see the “feat-CRAB” branch in my fork to view the most recent changes I made.

Accepted changes

I created a number of PRs in the last three months, all of which were accepted. The following are some of the more important PRs that I created with a brief description.

  • PR #4753: Made text selectable in the input boxes.
  • PR #4766: Implement MKV decoding.
  • PR #4801: Added ProjectorArchive for the Director Engine.
  • PR #5229: Integrate CRAB engine into ScummVM. This was the main PR for this project.

What work is left?

The following list of things need to be improved or are missing:

  1. Filenames are inconsistent.
  2. Unimplemented “fade-in” effect of music.
  3. Saving/Loading isย onlyย available through GMM load/save menus.
  4. “Options” menu selectable from the main menu is broken.
  5. Keymapper needs improvement to make the game fully playable using only a keyboard.
  6. Unimplemented “ironman” saves.

Conclusion

My time as a GSoC student has been fantastic. In the last three months,ย  I have learned a lot from my mentors and the community. I want to note that the ScummVM community particularly has been very welcoming and helpful to me.

I would like to extend a special thanks to my mentors, Eugene Sandulenko(sev) and Strangerke who answered a lot of my questions and provided continuous feedback on the changes I was making. Their expertise helped me complete the project successfully.

Oh, and, I was given the offer to join the ScummVM team, which I have accepted ๐Ÿ™‚ I hope to continue working on the CRAB engine and help maintain other engines in the time to come.

Thanks for reading!

Categories
Uncategorized

Getting CRAB merged into main branch

Hi all, welcome back to my progress blog for CRAB. As we get closer to the end of the GSoC period, I am happy to inform you, that the PR for integrating CRAB into ScummVM has been merged! ๐Ÿ™‚ In this blog post, I would like to detail what changes and improvements I made last week.

While most of my commits were around code formatting fixes and code cleanup, I did make a few exciting changes. My mentor, Sev, pointed out that Unrest had a demo version available on Steam, and I was able to add support for the demo version as well. This means that all of you can at least play one stage of Unrest for “quick feels” of how CRAB works on ScummVM!

Unrest – Demo running in ScummVM

Initially, the demo crashed due to bugs in MusicManager but I was able to fix it and now you can play the whole demo. As an engine developer, the consequences of having a demo version are really exciting because now a larger audience would be able to test out the engine. ๐Ÿ™‚

Next, I have made the debuglines that are drawn on the screen togglable using ScummVM’s debug console. You need to press CTRL+ALT+D and then type in the draw `XXX` command where XXX is the feature(TMX, Pathfinding, etc.) for which you want to draw debug lines.

Possible arguments for the draw command
Possible arguments for the draw command
Screenshot from the demo with draw TMX on
Screenshot from the demo with TMX debuglines on

I made some other small fixes here and there but that is all I did this week. The major progress of this week was that I was finally able to get CRAB merged, phew. Oh, and in other news, I have joined the ScummVM team. ๐Ÿ™‚ I plan to keep working on the CRAB engine and I’m also thinking of helping out with the SLUDGE engine. We’ll see.

Thanks for reading as always!

P.S., here are some links for announcements of CRAB getting merged into ScummVM:

Twitter: https://twitter.com/ScummVM/status/1689658519749013504

Facebook: https://www.facebook.com/ScummVM/posts/pfbid0d9pQ1LCKKsgH9JZ6EF5tdbKuJVpNXgYLryHmmLg5VG6vh7zzAPVAikuwym61YKKZl

 

Categories
Uncategorized

Finishing audio and polishing the engine code for PR

Hi all, welcome back to my progress blog for CRAB. This week, I worked on finishing the audio and made many other minor changes to gear up for getting my fork merged into the main branch.

The audio subsystem is fully in-place aside from the background music’s “fade-in” effect. You are able to set the SFX volume and the music volume from ScummVM’s game options menu. I fixed a variety of bugs in the audio system which could lead to crashes sometimes.

Next, I made various other minor tweaks such as moving some warnings to debugs and cleaning up the codebase as suggested by my mentor Strangerke. Wanting to have some fun, I compiled ScummVM with the CRAB engine for my Android phone to check whether it would run and if yes, to what stage I could proceed. To my delight, it ran wonderfully – till stage 5 where it just crashed without any logs. ๐Ÿ™‚

Unrest running on Android 13

Furthermore, I had a function stubbed out which made my saves unplayable. After un-stubbing the function and performing some little fixes, I tried again on my laptop and this time I made it all the way to the end!

I did notice some small issues in my gameplay which I was able to fix eventually. There was this interesting graphical glitch in stage 5 where the layering was broken.

If you look at this screenshot again, the character is supposed to be in a room but instead, due to the broken layering, she appears over the wall. This was happening due to incorrect handling of “Autohide” layers, and once I fixed the mechanism, it worked perfectly.

The room is drawn correctly.

Once you enter the room, these walls are supposed to simply disappear, so that you can see the characters in the room.

Yay! Fixed ๐Ÿ™‚

This is all that I achieved this week, and since the game is working without any crashes I decided to open a PR for merging my branch into the main branch. PR #5229. I should note that it might take a while for the PR to get merged, but once merged, you all should be able to play Unrest using ScummVM on your favourite devices.

Thanks for reading!