The (official) end of an amazing journey!

Hello! GSoC has officially ended, and I’m in the final stage – submitting my work for the entire summer to Google!

When I first received the acceptance letter in May, I was very much baffled. It was exciting and a bit scary at the same time, because I have never ever worked on a project of this scale. Well, first time for everything I guess :)

Reviewing & Polishing

Hello! Because I think I am mostly done with the new feature implementation, this week was mostly cleaning up the tree, and getting it ready for a PR!

Last week, I mentioned some special engines which were ported a little differently, so let’s start with those.

Some exciting progress to share, some new things to do!

Hello! Some very nice progress this week I can’t wait to tell you about. Let’s just jump right into it!

So, last week I shared that even though I had something cooked up that was somewhat correct, it wouldn’t really be suitable as a proper solution. I also discussed briefly on what was the approach I was taking on next. Because the new work would require cleaning up a lot, I just set up a new branch and cherry-picked some of the commits that would be relevant.

A huge jump of progress, & back at square 1?

Hello! What a busy week it has been, and I have some good things to share. In just over a little 3 days of time, I worked for a lot of time to implement the new idea I mentioned I had last week, and it was actually working quite well! I managed to implement the entire basic structure of it, as well as port over 8 of ScummVM’s 79 engines to adapt to it!

So, what’s the deal with this, and what did I do? The “idea” was just me getting a basic understanding of how things “could” work in a way.

Touching upon all 3 tasks

Hello! So, this week I have done things that ranged across all my tasks. Recently I checked out our sister project, ResidualVM. ResidualVM’s codebase is largely similar to ScummVM, but the main difference is the addition of capabilities to run 3D games. They also take regular snapshots from ScummVM to keep up-to-date. So, the work of RTL GUI which was merged in ScummVM was also present there.

Getting a better understanding & a little progress

Hello! The first few days this week, I spent trying to understand my task, and work on a small number of engines, and try to make games detect/work as a means to see if everything would work as expected. But first, some context.

ScummVM has a MetaEngine and a Engine.

ScummVM plugins – The new task

Hello! This week, I got started with my new task – “Moving detection features to the executable”.

What is the task?

ScummVM has over 50 engines that support many – many games. Currently, when compiled – these engines can either be compiled directly inside the scummvm executable (statically linked) or packed inside small packages of external libraries that can be loaded on demand (dynamic linking).

A small update

Hello! This week, I don’t have a lot of updates. A while after I created my last post the previous week, I cleaned up the history a little and opened a PR.

Then, the week was mostly spent on cleaning up more code and trying to keep the changes to a minimum basis – because I was modifying a large number of files (~280).

Right now, I am trying to combine String and U32String into a template, because they have a lot of similar functionalities. Reviews for the PR should be soon, so I will mostly be addressing those and working on the templated classes.

This week has been rather busy though because my final project from college had some documentation work pending and I self-reviewed my PR many times. It is exhausting to review so many files! I picked up many mistakes though as I reviewed them again and again, and the fixes were pretty simple.

That’s it from me for now. I hope to wrap my work this week and get a little more understanding of my next task, which is moving detection features to the executable. More about this soon!

Thanks for reading!

ScummVM translation files

This week there was slow progress on my task. I was also doing some miscellaneous things that related to my task.

The very first thing I want to say: My RTL-GUI PR has been merged into the master branch of ScummVM! Hooray!

Since the previous work was also related to GUI, I had to rebase my branch to even out with master and merge the RTL-GUI work into my own. There were many merge conflicts, but I was able to solve them all! Now that I think about it, merge conflicts are not as scary as I thought they were before. They are pretty simple!

Milestone 1 – Reflection on the task “RTL based GUI” and an overview

Domain Problem:

  • The domain problem is very simple. RTL language users read their texts in a right-to-left manner, and GUI for these languages is also specialized in a way that they will find intuitive along with their native language.
  • ScummVM did not have such GUI before. My first task (now near merge) introduces RTL based GUI, which will be useful for native RTL users.
  • PR: https://github.com/scummvm/scummvm/pull/2265

How I solved it:

  • To begin with, sev provided a proof of concept by ZvikaZ, which gave me a very good overview of how things “should” look like when finished.
  • I began with that proof of concept and slowly worked my way up. For example, after the proof of concept, I reversed the mouse coordinates. Then I checked each menu in the main dialog and worked there. Afterward, I worked with the stacked dialogs and positioning them correctly, reversing the tabs and contents, etc.
  • After good progress on GUI, I worked on flipping individual widgets. The widgets worked on here are: Lists, DropDownButtons, Radiobuttons, Checkboxes, Sliders. Sliders are disabled rtl for now because that is more comfortable for the rtl users, as communicated by them. These are very easy to enable/disable because one can just provide an ‘rtl = no’ in the layout file, which will disable the RTL-ness of an individual widget. For example, because sliders did not need RTL for now, one can simply set rtl=no to each slider type in the layout file and they regain their original behavior.

Challenges:

When I began my task, I didn’t really have any experience with big codebase before. I would thus say the task was a big challenge. But, after little progress day by day, I gained more confidence. I still had some challenges which took up a little more time than they should have:

Stacked dialogs positioning:

  • For this, I studied the behavior of the LTR GUI and tried to mimic it for RTL. It took me a little more time than I would like to admit, but in the end, I came up with a good solution.

Editable widgets:

  • I struggled with these in the beginning, because I had to keep text stuck to the right (at least for now). But, after a while, I was able to come up with a solution which was very clean and nice! I remember sev even commented “It is clever. I like it.” and it made me very happy!
  • Although, I should tell you that it was not the best solution. Soon after I came up with my solution, sev came up with a better and cleaner solution, and then rzil came up with an even better one. It was very interesting to see their thought process and definitely made me realize how I could do things better. In the near future, I will always try to see and think if a problem could be solved in a more elegant way.

LoadGame icons:

  • This was a problem I could not reach my own solution to. Other problems – I tried, struggled a bit but got to a working solution. This one, however, I just couldn’t get it. sev took a very short amount of time to figure it out. This was because I didn’t study backend code properly, because I thought my work would be abstracted away from it.

What things I could have done better:

  • I definitely could have studied the backends code better and understood it before I got started with my GUI task. I thought backends didn’t concern me until my 3rd task but I was wrong. Even if my work does not concern the backends, it is a good idea to understand how everything ties together and understand the basic connecting pieces from backend-frontend, so debugging and fixing things is easier.
  • Seeing how rzil has improved my code over a few patches, I could have thought of such solutions in the first place. I try to keep learning, so I will try my best to come up with solutions that are neat and up-to-standards with ScummVM. He has also worked on a PR to my branch, which removed some useless code and centered the alignment code and made it more abstract. It is always nice to see how my code is improved and has made me learn a great deal. Moving forward, I’ll try to see things on a bigger picture and think about how code can be improved.

Final words:

I feel like I did my best in the first task! I think it was a very great idea I got started with my project right away after the result announcements. Even though it is nearing the end of the first month (officially), I am reaching around 2 months with coding in ScummVM and I feel like I am actually contributing a little to this huge project! My mentors and the community of ScummVM have been really helpful throughout the whole time. It was very nice interacting with everyone, and I plan to keep up the (hopefully) good work over to my next 2 tasks (and more maybe!).

Thanks for reading!