Skip to main content

Posts

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. When I was running the application with the Hebrew language, some popups and drop-down buttons looked quite different from the normal GUI. Upon a little investigation, it looked like paddings were being set wrong for the RTL-widgets set in the theme. This was because back when I was on my RTL task, I temporarily set a padding of "2" as a placeholder to check, and then completely forgot about it as the difference was ever so subtle. I'm glad though, that I found this, and opened a PR to fix it. English, proper paddings Hebrew - Improper paddings Hebrew, mirrored and matching paddi...

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. MetaEngine A MetaEngine is responsible for, as the name would suggest, a meta-data related things before we actually start the engine. This is an abstract class, and each specific engine must inherit it and have their own implementation of it. Alternatively, we also have an AdvancedMetaEngine, inheriting from MetaEngine, which provides a default Game Detection algorithm - which saves individual engine developers the hassle of providing detection tools. The detection algorithm is an Md5 + filename check and makes game detection easier for engines. These engines can inherit from AdvancedMetaEngine and provide some other metadata/utility functions, like getting supported games, querying which features an engine has, etc. Adva...

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) So, why would we even opt for external libraries? Wouldn't packing everything into the executable give the best performance? Well, yes. But the thing is, ScummVM has a lot of platforms it supports ( ScummVM Platforms ) over 30! It's very portable, which is one of the really amazing features of ScummVM. With dynamic plugins, the executable sizes are lowered. Because of this, when we need to detect games - each engine is loaded by one and the relevant detection happens. This is slow. The main purpose of this task is to move the detection related features to the executa...

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 dete...

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! I've set up Travis-CI to build my branch. I did this because continuous building on my machine was very slow, and with Travis, it is very easy to catch up on errors, correct them, and so on. After rewriting history several times, I was able to solve all errors (~50) that didn't appear on my local machine. I use MSVC, so many instances of errors don't appear on my machine - even though it builds and runs completely fine. This week,...

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. Th...

More progress on my task & getting close to the finish line

Hello! I was not as close to finish as I had estimated before. However, I have some more good progress on my task! Right after my blog the previous week, I found the problem which was making me very concerned about my code. Whenever I ran ScummVM, it took about 20-30 seconds to start. I was worried that some of my code could be troublesome, but then I found out my configuration file was a little too big. The configuration file (scummvm.ini) stores some useful information and is often low in size (~10KB) or so. In code, we interact with this file using "ConfMan". For my previous task, I configured this to get a boolean from the .ini file to force the RTL-based GUI. I think some of my temporary code would have caused this issue. The ini file was around 150MB big! I was curious to see what it contained, so I opened it in sublime. It took ~15 minutes to open and it had this: 15 minutes! For my own amusement, I have saved this file in another location. I simply dele...