Accéder au contenu principal

Games 3.30: Features Overload

With a new version of GNOME always comes a new version of Games, and this new version comes packed with new features, bug fixes and developer experience improvements.

Platforms View and Developers View

As part of his GSoC project, Saurabh implemented two new views of your games collection: one filtering games by their developers and another one filtering them by their platforms.

To know more, read Saurabh's Segregating views and Description view articles on his blog.

To implement this he needed to work a lot on the Grilo front, check his explanations in his Adding self registering keys to lua-factory article.

He also started to work on a new page displaying many details about a game like the number of players and a description, it was unfortunately not ready on time for this release but will hopefully land in 3.32.

Gamepad Navigation

You can now navigate the UI with your gamepads! Select your collection view with the shoulder buttons, browse your games with the analog stick or the directional pad, enter the game with your A or cross button, and go back to your game collection with the home button.

This makes Games even more suitable for a gaming console setup like a HTPC or a handheld like the GPD Win, and even more comfortable to use on your desktop or laptop.

libmanette Event Deferring

Notes this is a small technical aparté, if you are only interested about what is new in Games you can skip it.

I implemented a prototype of gamepad navigation during the 3.28 development cycle but it has not been merged before because of a strange bug: when entring a game with the gamepad it was not possible to choose to resume it or not with the gamepad, but when entering it with the pointer or the keyboard it was possible to resume it or not with the gamepad.

Here is what happened:

  • libmanette was looking for input on an the gamepad's event file via g_io_add_watch(), polling the events, parsing the events and sending the corresponding signals,
  • Games was listening to these signals, triggering the game and triggering the resume dialog which was then waiting for a response from the user.
The execution line from the input channel watch source's callback to the dialog waiting for a response was direct: we never finished polling the ongoing events, we never returned the source's callback, the source callback was never added back in the main loop, so we couldn't receive more events from that gamepad!

The solution I choose is to queue a source on the main loop for each gamepad event, so we are sure we finished polling them all before they are treated, and so if an event is blocked it is not going to block other events!

Keyboard-as-Gamepad Mappings

Abhinav implemented a way to set which keyboard keys are mapped to a mock-gamepad used by retro games. Thanks to him you won't have to guess which keys we choose by default: just set yours!

He started working on it during his GSoC 2017 but I have been pretty bad at reviewing it, so it waited on Bugzilla and then GitLab for more than a full development cycle, woops. 😶

Polishing the UI

Alexander brought a few minor corrections to the UI, like fixing the size of the icons used in the media selector button (it was too large) or dropping a box shadow surrounding the collection view.

I took care of migrating the app menu into the window and to add a help button and a shortcuts window. I also made the thumbnails shrink to a smaller size if the widow is narrow, So you can have more than a column or two of games visible in these extreme cases.

Running from Flatpak

Running native games from a flatpaked version of Games finally works thanks to Alexander! That means you can now run desktop games, Steam games and LÖVE games from the version of Games we recommend you to use. Unfortunately Games when flatpaked still can't list desktop games from your system, but it can list the ones from your home like your GOG games so you can run these.

New Platforms

Alexander implemented support for the Flathub version of Steam: its games can now be listed and ran alongside the ones from the native installation! Also, Steam games using the new Proton Windows compatibility layer work out of the box.

He also worked a lot on adding Nintendo DS and Virtual Boy support as well as making sure Libretro cores for these new platforms work well in Games. Dont expect special features like making one screen of the Nintendo DS fullscreen or selecting the anaglyph mode of the Virtual boy yet, but at least the games are playable and you can use your mouse pointer to interact with the Nintendo DS touch screen!

On my side I found a well working free software Libretro core supporting Game Gear and Master System games, which allows you to finally play games for these platforms.

Tests, Options and CI

In a previous article I told you about how having tests and CI would allow us to have more feature. Well, we now have a new feature thanks to that. 😁

We now run reftests on many Libretro cores we ship, we are not testing everything we would like to yet but it's already way better than not tests at all! As part of our reftests, we also check the options that the Libretro cores offer are as expected.

Options are a way for a Libretro core to offer a custom (and usually domain-specific) API, an option (or variable as it is called in Libretro) being a key which can take only one value from a specific set of values. Given that options are "runtime" APIs and given that we don't control the cores offering them, we couldn't trust them to be stable and hence we couldn't use them.

Thanks to the reftests and the CI, we can be warned of any change of these runtime APIs, so we can react to their changes, so them not being reliable isn't a problem anymore, so we can use them! I implemented options accessors in retro-gtk and Alexander used them in Games to set a core's options at boot time. Distributors can change these options easly as they are .options keyfiles installed in /usr/share/gnome-games/options.

This combination of tests and CI directly led to new features as we are now able to ask the Nintendo DS Libretro core DeSmuME to use the pointer instead of an emulated mouse, making is usable and shipable with our stable Flatpak!

A big thanks to Jordan Petridis for helping with the GitLab CI for Games and retro-gtk! 😄

Meson

Thanks to Alexander, Games now uses Meson instead of the Autotools, making it simpler to maintain and faster to build. My coffee breaks are ruined!

Lesser retro-gtk Improvements

Aside the aforementioned focus on testing, enabling access to a core's options, enabling configuration of the core view's mock-gamepad and the various bug fixes, retro-gtk received some smaller but notable improvements: retro-gtk now handles the RETRO_ENVIRONMENT_GET_LANGUAGE and RETRO_ENVIRONMENT_SET_GEOMETRY Libretro environment commands, allowing the cores respectively to know the current language and to notify changes to their video output's geometry.

Leaks fixes

Some reference leaks in retro-gtk and Games were caused by dependency cycles between a core and its view, preventing them to be freed. The links are now unset before releasing the references to the objects. Similarly, if a main loop was dropped while running then a reference to it was dropped and this is now fixed.

Thank You

I would like to give a huge thank you to the many contributors to this version:

  • Mathieu Bridon for keeping an eye on our Flatpak builds and for helping fixing them for ARM,
  • Jordan Petridis for helping a lot with our CI infrastructure,
  • Saurabh Singh for doing great on his GSoC project,
  • Abhinav Singh for mentoring Saurabh and for his many contributions,
  • and Alexander Mikhaylenko for basically taking over my role as a maintainer during this whole development cycle, ensuring the application was in a constant good shape, fixing bugs tiny or big, reviewing merge requests… the list is too long!

Stepping Down

I have been working on Games, its companion libraries and their prototypes since some time in 2013, and Laurent Pointecouteau and I were discussing and designing the application a year prior to that. It has been many fun years but I am now a bit tired and need to move on to other projects, so as Alexander is stepping up as a new maintainer of the project I am stepping down: I am no longer maintaining Games.

Abhinav and Alexander have proven they can make the project shine better than I can, so I am sure they are going to do great things with it! Anyway, I am not disappearing as I am still maintaining the two libraries that spun out of Games: retro-gtk and libmanette.

Commentaires

Posts les plus consultés de ce blog

Librem 5 ❤️ GNOME 3.32

I am glad to announce that the tooling I am working on since the beginning of the year is ready to be used!Thanks to new features introduced into libhandy 0.0.3 and 0.0.4 and thanks to a few fixes to Adwaita in GTK+ 3.24.1, you can make GTK+ 3 apps adaptive to work both on the desktop and on the upcoming GNOME-based Librem 5 phone.We are early in the GNOME 3.32 release schedule and the Librem 5 will be released a bit after it, so if you want your apps to work on the Librem 5, now is the best time: use libhandy 0.0.4 and up, use GTK+ 3.24.1 and up and target GNOME 3.32! A few apps like Fractal, Podcasts, Calls and Chatty are already using libhandy's adaptive capabilities, and other apps are working on their adaptive transition like Contacts, Games, Geary and Settings (all are works in progress). libhandy is available in Debian Unstable and Arch's AUR repository, and I wish it would be in Fedora already to let GNOME Settings' CI pass.For the moment, libhandy is a GTK+ 3 widg…

GTK+ Apps on Phones

As some of you may already know, I recently joined Purism to help developing GTK+ apps for the upcoming Librem 5 phone.Purism and GNOME share a lot of ideas and values, so the GNOME HIG and GNOME apps are what we will focus on primarily: we will do all we can to not fork nor to reinvent the wheel but to help allowing existing GTK+ applications to work on phones.How Fit are Existing GTK+ Apps?Phones are very different from laptops and even tablets: their screen is very small and their main input method is a single thumb on a touchscreen. Luckily, many GNOME applications are touch-friendly and are fit for small screens. Many applications present you a tree of information you can browse and I see two main layouts used by for GNOME applications to let you navigate it.A first kind of layout is found in applications like Documents, I'll call it stack UI: it uses all the available space to display the collection of information sources (in that case, documents), clicking an element from t…

One Widget to Adapt Them All and to The Librem 5 Port Them

In my previous article I shared my plans to help porting existing GTK+ applications to Purism's upcoming Librem 5 phone without having to fork them. This article will present the GTK+ widget I developed for Purism to make this happen.For more information on what Purism is working on for the Librem 5, please check Nicole Faerber's latest article.C'est pas sorcierThe underlying idea is to allow applications to dynamically switch between the two main GNOME application layouts: a row of panels — each panel being the view of an element from the previous one — and a stack of panels. The goal isn't to changes applications using the stack paradigm but the ones using the row one, allowing them to reach smaller sizes and to be usable on constrained sizes while keeping their initial paradigm and design when the screen space is sufficient. The development cost to port the applications to this adaptive design should be as low as possible.To achieve that, I wrote a GTK+ widget which…