Lately I have been spending a lot of time staring at the Resume/Restart dialog of GNOME Games.
Games currently allows the user to resume most retro games from the exact state the game was left in last time it was quit. To do this Games saves several files required to restore the state of the emulator core and resume it’s execution. These files grouped together are called a “savestate”. Currently Games has only one savestate per game which is overwritten everytime the user exits the game.
The purpose of my GSoC project is to allow the user to store and manage more than one savestate. These past days I have been writing code that makes Games create a brand new savestate everytime the user exits the game.
Before my changes the Resume button would simply load the single savestate which existed for that particular game. Now it loads the latest savestate that was created, so from the user’s perspective nothing has changed (with one tiny exception I’ll explain later).
My changes are slowly amounting to 1000 lines of code (insertions + deletions). I admit it does feel a bit uneasy to edit 1000 lines from the app’s code and not see any changes from the user’s point of view. It makes me wonder how often does this also happen with other software that I’m using :S
Unfortunately, there is one minor downgrade that my changes have introduced. As can be seen from the first image in the post, there is a screenshot of the game behind the Dialog. My changes have altered the sequence of operations required to boot the emulator core, which in turn broke the loading of screenshots. Now, when starting the game there is always a black screen behind the Resume/Restart Dialog 😦
In the next days I will finally start working on a primitive UI that is going to display all of the savestates that are available when launching a game. The UI would also allow the user to boot the game from a particular savestate on click.
Between my last blog post and now I have been accepted into the Google Summer of Code programme (or GSoC for short), which is basically an opportunity for students to work on open-sorce software projects throughout the summer and also receive a stipend (money) for it.
The coding period officially began on the 27th of May, but I actually started working on my project before that in order to get a head start.
Throughout the summer I will be implementing a feature for GNOME Games. To be more specific, I will be implementing a “Savestates Manager”. The feature itself has already been designed and the details about how it should work are explained very well in this wiki page: https://wiki.gnome.org/Design/Playground/Games/Snapshots
Currently I’m working on automatically migrating files from the old directory layout to the new one in order to support multiple savestates. This is how the new directory layout is going to look like:
The snapshot file is probably the most important one because it’s used to set the state of the emulator core. The creation date is used to uniquely identify savestates.
I will keep adding blog posts as I continue to make progress and hopefully there will also be some UI to screenshot before the next post.
Hi ! Yeti here, I’m currently an engineering student and during my free time I contribute to this cool open-source app called GNOME Games (or just Games for short).
One would expect an app with that name to be some kind of collection of mini games for GNOME but you would be wrong. Games markets itself as a “games manager”, which means it automatically detects all of the games installed on your machine and lists them, such that you have all of your games nicely gathered together in one window.
But IMO (“in my opinion” in IRC jargon) the juiciest feature of this app is that it comes packed with a bunch of emulator cores which means that you can run retro games like Game Boy games directly in the Games app window.
In this blog I will post about my various endeavors in contributing to this app.