GSoC 2022 Summary

Hi! I am Avijeet Maurya, one of the GSoC 2022 contributors working on ScummVM. The main focus of my GSoC project was on improving the condition of several existing game engines through bug fixes and implementing some other improvements.

What was done

GLK Scott

Implemented support for C64 and TI99/4A games by porting the GLK Scott interpreter from spatterlight.

Blog Posts:

Week 1 – Getting started.

Week 2 – Some progress and cleanup

Week 3 – Community Bonding period ends

Week 4 – Start of the coding period

Week 5 – Finishing up Scott

Pull requests: #1, #2, #3, #4


Various bug fixes related to the in-game PDA and updating the code to work with the newer MacGUI implementation. Also fixed bugs related to Hebrew support.

Blog Posts:

Week 6 – Working on PINK

Week 7 – Finishing up PINK

Week 11 – Finishing WAGE and PINK

Pull requests: #1, #2, #3, #4, #5, #6, #7, #8


Various bug fixes and MacGUI related improvements.

Blog Posts:

Week 8 – Working on WAGE

Week 9 – Working on WAGE II

Week 10 – Working on WAGE III

Week 11 – Finishing WAGE and PINK

Pull Requests: #1


Various bug fixes related to GUI.

Blog Posts:

Week 12 – Working on MacVenture

Week 13 – Working on MacVenture II

Week 14 – Working on MacVenture III

Week 15 – Wrapping up

Pull requests: #1


Fixed two gameplay bugs.

Blog Posts:

Week 15 Part II – Working on Avalanche

Pull requests: #1

What is Left

The leftover work is distributed between MacVenture and Avalanche. For MacVenture I still need to:

  • Implement lasso selection
  • Add IIGS support

For Avalanche I need to work on the TODOs listed on the wiki page.

Closing Thoughts

GSoC wasn’t something I could have completed on my own so I would like to start by thanking the ScummVM team for being so helpful at all stages of the program. Special thanks to sev, eientei, Jaderlund and Voltya for helping out with different parts of the project.

Getting started with contributing to other open source projects was always a daunting prospect because of how difficult it was to actually understand the huge codebase of various projects but this time I managed to overcome that through a combination of just going at the problem at hand and also asking for help when needed.

A really important thing I discovered through GSoC was to have a positive mindset while coding. I never really felt nervous, even when I was stuck on something because I knew I had people to rely on and ask questions to. This helped me progress through in a much more relaxed manner which is something I don’t think I could have done before.

And speaking of asking questions, it was something I always hesitated to do because I felt like it was a stupid thing to do but now I know that it’s better to admit that you don’t understand something rather than pretend that you do and cause problems later.

Another thing I have learned through GSoC is getting into the habit of working daily. I used to be very irregular in when I work and I am happy to have changed that.

I also liked writing the weekly blogs and from now on I’ll try to write about what I work on, even if it’s just some personal notes. You need to really understand what you are working on to write about it and I often had some new insights about the problems I was facing when I tried to describe them in my blog.

And in the end I want to thank all the people who followed me through this journey and read the blog posts. I really enjoyed writing them and it’s great knowing that there were people who interested in reading what I had to say!

Thanks for reading!

Week 15 Part II – Working on Avalanche

A small addition to Week 15’s entry is some work I did on Avalanche. There’s wasn’t much time left when I got to Avalanche so after looking at the pending issues, I decided to tackle some gameplay bugs as those are generally simpler than implementing entirely new features.

The first one was about the in-game movement direction indicator.

Direction indicator in bottom left.

The game has two different movement methods, arrow keys and clicking. The bugged behavior would update the direction indicator only when arrow keys were used. To fix this was quite simple, I just found the function used to handle keyboard input and checked how the direction indicator was being updated for the corresponding arrow key input. I then went to the part of the code which handles mouse input and used those same function and now it works perfectly.

The second bug was something I found while playing through the game. Spoilers for the game upcoming incase that’s something you are worried about.

There’s a segment where you have to climb up a dais but it’s rigged to shoot a arrow as soon as you do that. The solution to progress is to quickly climb down to avoid the arrow. However, the bugged behavior would insta-kill you as soon as you entered the command to climb up.

We are killed before the arrow reaches us.

To fix this I looked for the code which handles the arrow firing event. Luckily the error in that code was quite obvious.

The same sprite data is used for both the character and the arrow

The sprite data is what holds the coordinates of the sprite. Since the same sprite data was being used, they would immediately pass the collision check. I replaced this to use the correct sprite data for the main character.

We now die when the arrow reaches us

This was the last fix I could make for Avalanche in the time I had and also the last of my contribution for this GSoC. This was a great journey and working on ScummVM was a good experience for me. I’ll be posting a GSoC summary post after this (and you might have already seen a password protected version thanks to a mess up) so look forward to that. Thanks for sticking to the end with me!

Week 15 – Wrapping up

The final week of GSoC and it ended up being rougher than I hoped for last week.

I started working on implementing lasso selection and in theory it was really simple. All I had to do was:

  • Detect if a click inside the inventory window is on a object or not.
  • If it’s not on an object then we can start the lasso and start polling for mouse move events.
  • On a mouseup event, we select all the objects inside the current lasso area.
  • Then we should be able to click and drag any of those objects to move all of them

I managed to get the item selection working and it should have been enough to get the lasso working but unfortunately it wasn’t that simple. During the process of porting the WebVenture code, the behavior of many functions was changed and the overall flow and structure of the engine has been altered significantly. The changes were small enough that you could technically still clear the games but they add together to make it harder to finish adding all the functionality from WebVenture.

An example of such change is the ability to move objects when they are selected. Here’s two GIFs showing the behavior on a Mac and WebVenture:


And here’s what happens with ScummVM:

By itself, it’s just a minor annoyance while playing and can be worked around. However, it’s a required functionality for lasso selection to work. Here’s how lasso selection looks on the Mac:

I couldn’t really figure out how to make lasso work without some major rewrites to parts of the code so I decided to leave this for later. The current TODO list for MacVenture looks like:

  • Fix some minor behavior discrepancies
  • Add IIGS support
  • Add Lasso selection
  • Implement some stubbed functions

There’s not much time left in the final coding period so I have opened a PR with my currently finished work on MacVenture. I’ll also try to finish some of the TODO tasks for Avalanche which were listed on it’s wiki entry here.

The coding period might be coming to a close but I am planning on continuing my work after GSoC during the coming weekends. I’d also like to write a blog post looking back at all the work done during these 15 weeks so look forward to that. Thanks for reading and see you next week!