vendredi 2 décembre 2016

GNOME Core Apps Hackfest 2016

This November from Friday 25 to Sunday 27 was held in Berlin the GNOME Core Apps Hackfest.

My focus during this hackfest was to start implementing a widget for the series view of the Videos application, following a mockup by Allan Day.

To make this more interesting, I implemented this view using Emeus, Emmanuele Bassi's new in-development constraints based layout system for GTK+. You can find the (clearly unfinished) result here: I will keep working on it with Victor Toso who did some initial prototype last year.

Working at the hackfest was a great experience, interaction with the other contributors was face to face which helps a lot strengthening GNOME as a community. 😃

Thank a lot to Kinvolk and Collabora for helping to make this hackfest a great event!

dimanche 18 septembre 2016

GNOME Games 3.22: the Giant Leap

I didn't blog about Games since quite some time and the app changed a lot since 3.18. 3.20 was quite a small update featurewise: it added support for MAME and Neo Geo Pocket games, added the About dialog, allowed l10n of the application, added a Preferences window listing the available plugins and fixed other small bugs, but this release mainly saw refactoring work with the introduction of the plugins system where plugins allow to list games: the Steam plugin lists Steam games and the SNES plugin lists SNES games.

So with 3.20, Games was ready to be improved upon and improvement there was! 3.22 is the first properly usable version of Games

The biggest change this cycle is the number of contributors to Games' codebase, first of all with two GSoC interns working on it: Megh Parikh and Ricard Gascons did a great job as I will detail it later. But Games didn't gain contributors only via GSoC: Bastien Nocera has been helping on the project since a year or so and got even more involved recently, and Mathieu Bridon implemented several new features and helped a lot working on Flatpak integration as well as on shipping the Libretro cores.

Supported Game Types

We disambiguated several games related MIME types in shared-mime-info:

  • SG-1000 and Game Gear games got disambiguated from the Master System ones;
  • Mega-CD, 32X and Sega Pico games got disambiguated from the Mega Drive ones;
  • Game Boy Color games got disambiguated from the Game Boy ones.

This disambiguation done, Games wouldn't be able to detect these games as it was only looking for Master System, Mega Drive and Game Boy games, hence we now suport them explicitly. Games also gained support for new systems, here are the newly supported systems in 3.22:

  • Atari 2600;
  • Atari 7800;
  • Game Boy Color;
  • Game Gear;
  • Mega-CD — a.k.a. Sega CD;
  • Mega-CD 32X — a.k.a. Sega CD 32X;
  • Mega Drive 32X — a.k.a. Genesis 32X, Super 32X and Mega 32X;
  • PC-Engine CD-ROM² and its variants — a.k.a. TurboGrafx-CD;
  • PlayStation;
  • Sega Pico — a.k.a. Kids Computer Pico;
  • SG-1000.

Keep in mind that what we mean by support is that Games can list the games for this system, it doesn't mean it can run them — this ability depends on other factors such as whether a Libretro core able to run the game is installed — nor that it will run properly — for example, games requiring a mouse aren't supported yet.

Covers and Icons

Batien Nocera wrote a Grilo plugin retrieving info from and I made most game types use this in Games. The previously discussed new MIME types have been added to shared-mime-info to allow us to support more game types but also to discriminate properly the different types in this plugin: before that we had no proper way to know if a Game Boy game was a Game Boy one or a Game Boy Color one.

Games can automatically fetch covers from

Maybe doesn't have a cover for your game, but that's not a problem: this website is crowdsourced, contribute a cover and it will appear in Games!

What if you simply don't like the cover the website returned for any reason: no problem, if you have a game located at /path/to/mario.nes, an image file will be used as the game's cover if it's named like:

  • /path/to/mario.*,
  • /path/to/cover.* or
  • /path/to/folder.*

where * is any extension.

If you have cover image files alongside your game files…

…Games will use them for the games' thumbnails.

Headers of Steam games are downloaded from the Steam store's website and used as the game's cover.

With pretty covers to show, we decided to double the size of the game thumbnails (from 128 pixels to 256 pixels) to better appreciate them! If your game still has no cover to display, it may have an icon: desktop and Steam games already displayed their icon, but now icons are also extracted from LÖVE packages and Nintendo DS games.

Fullscreen Support

I finally found some time to work on the fullscreen mode! It is available to Libretro based games: on the game display page at the top right corner you will find a Fullscreen button allowing you to switch to the fullscreen mode; in this mode the headerbar and the pointer will be hidden after 2 seconds of pointer inactivity, just move the pointer to reveal them.

You can toggle the fullscren mode by pressing Ctrl+F or F11, and you can escape it by pressing Escape; leaving the game will also quit the fullscreen mode.

Gamepads Support

Megh Parikh added support for gamepads to play Libretro based games; the gamepads are discovered with udev and are read with libevdev.

He implemented support for the format used by SDL2 to map the input events sent by the gamepad into meaningful gamepad events: with that, Games can know for any mapped gamepad that the Start button got pressed rather than the 10th button. Games comes with a large database of gamepad mappings.

Linux's input system has proper gamepad inputs (buttons, etc.), even though only a few gamepads send these proper events we should support them even if Games doesn't have a mapping for them: we already can know which button is which one! Hence I added support for these: to work with Games, your gamepad need to send proper gamepad events or to have a mapping available. If your gamepad doesn't work with the application, consider it a bug!

Games doesn't have a user interface to handle the gamepads — yet? — but it doesn't need it to be usable! Megh implemented an automatic way to assign a controller to a player, here is how it works:

  • when a gamepad is plugged in, it is assigned to the first player with no gamepad;
  • when a gamepad is plugged out, the player which had it have no gamepad instead and any other player keep its controller;
  • the keyboard is assigned to the first player with no controller after reassigning the gamepads.

If your gamepad doesn't work with games, consider it a bug too!

PlayStation Support

PlayStation support has been a big focus for Ricard Gascons and to a lesser extend for myself. Ricard added multi disc support for PlayStation games: if the game you are playing has multiple discs then the header bar will contain a button with a CD icon, pressing it will reveal a list of the discs of the game, selecting one will switch the disc in use for this game, allowing you to keep progressing almost seamlessly.

You can switch between the multiple discs of a PlayStation game.

Some discs have a title, if it's the case it will be displayed rather than Disc n as the disc's title.

If a PlayStation disc has a title, Games will display it.

The DualShock controller for the PlayStation which has been introduced after the launch of the console has two analog thumbsticks and several games take advantage of it. These controllers feature a button allowing to present the gamepad as a DualShock controller or as a classic controller, this was a workaround for compatibility purpose as earlier games wouldn't work with a DualShock. For gamepads to work seamlessly with any games in Games we needed to automatically select the correct gamepad type: if your game doesn't support DualShock, we present the gamepads as classic ones, otherwise we present them as DualShocks.

To achieve grouping several discs into a single game, knowing a disc's title and knowing the supported gamepad types, Games ship a database containing these informations so it can work out of the box; this also allow Games to display a good title for any known game .This database is built by dumping the PlayStation DataCenter website, if you find an oddity, it's either a bug in our dumper or in the website!

Pause on Focus-Out

You probably don't want to lose the control of the game because the window loses its focus and when playing you'll likely have the window focused, so I made Games pause a running game when the main window loses the focus and resume the game when it gains it back. If the window loses its focus to the Shell, the pause is delayed by half a second, allowing to pause when the shell takes the focus while avoiding annoying micropauses when a short notification appears on screen.


To avoid the screen to go black when playing a game, Mathieu added a screensaver inhibitor; and to avoid to loose a running game he also added a session inhibitor: when trying to close your session you'll be warned if a game is running.

Resume and Quit Dialogs

Unfortunately some integrated games can't be saved and resumed, hence quitting such a game implies you will lose your progress. To be sure you know that, I added a dialog letting you to quit the game and to lose your progress or to keep playing.

The dialog proposing you to resume the game or to start it over has been overhauled: it used to allow you to:

  • resume the game with a Resume button;
  • restart the game with a Main Menu button;
  • go back to the games list with a Cancel button.

This was confusing: Main Menu took you back to the game's title screen while many thought it moved you to the games list; also the Cancel button wasn't really useful as you could as well choose to resume the game and then quit it. So Mathieu refactored it by renaming the Main Menu button into Restart and by removing the Cancel button.

Mathieu then added a new dialog letting you to choose what to do in case resuming the game failed for any reason: you can reset the game with a Reset button or choose to do nothing and go back to the games list with a Cancel button.


There was an annoying bug which made the sound stop working after playing a game for some time, it was caused mainly by a poor usage of PulseAudio in retro-gtk, it has been fixed by using the PulseAudio Simple API instead. Another problem was that an error made any game run at 60 frames per second rather than the rate needed by the game's system. I fixed both problems into retro-gtk so sound and game speed should work as expected.

Running a Game Failed

When Games failed to run a game it used to display a message in an infobox at the top of the collection view, this didn't work well so I replaced this by the following page.


Bastien and Mathieu worked a lot to make Games work better with Flatpak: they found missing functionalities in Flatpak which are now shipped, they made gamepads work in the sandbox, they helped making the nightly flatpak build, they added some Libretro cores to Games' nightly Flatpak… so many things I probably forgot some.

Speaking of Libretro cores, this is the biggest problem when distributing Games. We are currently relying on retro-plugins to distribute a curated set of Libretro cores but it doesn't work well:

  • it isn't very useful as it simply ships the content of other projects;
  • it limits Games to the cores shipped in it and there aren't many;
  • Games contains hardcoded information we need about these cores, which is terrible;
  • it gives us the burden to maintain this module when we have many more important things to work on.

retro-plugins was good when the project was young but now it needs a better way to ship Libretro cores. The libretro-super project seems to be the de facto standard way to install Libretro cores, it installs them in the $(libdir)/libretro directory with info files for each core. We started working on extending these info files to make them include the information we need: a way to pick the best core to run the games we want and whether the core supports resuming the games. We will help hardening this solution so we can deprecate retro-plugins and use this instead.

We started testing this solution in the Flatpak version of games: it doesn't depends on retro-plugins, instead we directly ship some Libretro cores with an extended info file.


Many other things happened, for example Games received many translations and I fixed some bugs in the PCSX-ReARMed Libretro core with the help of Alexis Puskarczyk.

Despite remaining rough edges and lacking features, I'm extremely proud of this release as it marks the first really usable version of Games!

jeudi 25 août 2016

GUADEC 2016 and the Butterfly Effect

Between August 10th to 17th included, I went to the nice city of Karlsruhe for GUADEC 2016.

The Trip to Karlsruhe

I arrived the 10th at 11 P.M. to Karlsruhe's train station after a 9 hours train trip, it was the first time I visited Germany and by night the city was calm and fresh which was nice after such a trip. Before going to the room I rented for the night I made a small detour to meet some gnomies as they were going out of their restaurant, it was nice to see some familiar faces again. :)

The Training Workshops: Discovering GStreamer

The 11th I participated to the GStreamer training workshop held by Olivier Crête, it was a really pleasant experience and I hope there will be more workshops during the next GUADECs!

The Core Days

This year again there were plenty of interesting talks, I won't give details as you can see them by yourself online... That being said, I helped filming some of these talks which was an interesting experience and I am eager to help doing so again the next years!

If you are going to some GUADECs you should really consider volunteering, it enhance the experience a lot for you as you are experiencing it from the inside and for the others as you are helping making it better!

The BoFs

On monday afternoon, the Games BoF went pretty well, with Bastien Nocera and Mathieu Bridon we worked hard on polishing Games:

  • we started the work to deprecate and drop the retro-plugins package as maintaining it is a burden to us
  • we made gamepads sending proper gamepad events to work out of the box
  • we polished some UI elements like the "Resume" dialog
  • we started the work to add session inhibitors to avoid the session to lock while you are playing, and to warn you if a running game can't be saved when quitting the session
  • ...

We also tried to make Games play nice with Flatpak: we ensured the Flatpak builds correctly, managed to package some Libretro cores with the Flatpak:

  • we ensured the Flatpak builds correctly
  • we managed to package some Libretro cores with the Flatpak
  • we managed to get the gamepads somewhat working
  • ...

The result is that now Games is usable as a Flatpak which will make its distribution way easier!

The Social Events

I attended the barbecue on Thursday, the picnic on Friday and the diner at the Hoepfner Burggarten on Sunday and all these events were really fun and well organized.

The Saturday with Bastien and Mathieu we skipped the social event at the Z10 bar to visit the RetroGames e.V, a non-profit organization holding an arcade full of retro cabs. The entrance is €3 and you can play as much as you want so it's really cheap and you can have plenty of fun with their exotic games!

On a sidenote, I recommend you to eat at Casa do José, it was really good. :)

Many Thanks to the Organizers

I want to thank again all the organizers for their awesome work and also the volunteers: this GUADEC was great! :D

Visiting the City

On Tuesday morning I had the chance to visit some parts of the city with Moira who knows it a bit, it allowed me to see the big castle and more importantly the very large park behind it. I will always be amazed by how much the parks and the country can be green and lush in the middle of summer in the North/in the continent. :)

Protip: there are plenty of blackberries in the park.

The zoo is just in front of the train station and it can be crossed for free on a bridge, from there you can see some elephants and by walking aside the zoo you can see some penguins.

Trying to Go Back Home

On Wednesday at 11:30 I took the train back to my hometown of Montpellier... at least that's what I thought! Maybe you remember Jeff's adventures in Frankfurt last year, well I lived something somewhat similar.

This very day a hailstorm hit cities between Montpellier and the nearby city were I grew up, this sudden storm caused a pine to fall on the rails just before Montpellier and a regional train hit it causing all trains between Lyon and Montpellier to stop. At 5:30 P.M. I had to leave the train in Lyon, after some time at the train station's reception desk to gather useful information I learned that traffic was planned to start again on Thursday morning, which implied that I had to pass the night there. Fortunately I have some friends in Lyon like Bastien Nocera and Mathieu Bridon (them again) whose train was planned to arrive a few hours later, hence after warning them I started moving to Mathieu's apartment where his wife received me. It ended up being a pleasant adventure for me as it allowed me to see her again after several months. :)

See you in Manchester!

mercredi 6 avril 2016

GNOME at the 'Journées du logiciel libre'

This April 2–3 2016 the 17th Journées du logiciel libre (Days of Free Software) were held in Lyon (France).

GNOME 3.20 was demoed on the stand, running on Fedora 24 alpha, and goodies such as t-shirts were proposed to our visitors. Lots of persons came to visit us, from complete beginners to seasoned users and I noticed some patterns in the questions of the beginners: lots of visitors asked whether GNOME is an operating system (or "like Ubuntu"), while others asked if they were able to install it on Ubuntu.

On a side-note, we accidentally changed the code of the event box's padlock when locking it at the end of the first day, hopefully Matthieu "starmad" Gautier was there to save the day by brute-forcing the padlock, trying hundreds of combinations, and allowing us to install the stand again and greet our visitors decently.

starmad gauging his opponent, photo by Didier Roche

To participate to this event and to help on the GNOME stand I had to trip from my hometown of Montpellier (France), it was a two hours trip by TGV and I was glad to meet lots of GNOMies again (Mathieu Bridon, Matthieu Gautier, Haïkel Guémar, Bastien Nocera, Frederic Peters and Michael Scherer) and to meet Didier Roche for the first time. We had a great deal of fun together! =)

This event was really nice and I hope I'll be able to help next year too, and more importantly: I hope to see you there!

lundi 22 février 2016

GNOME Games 3.20 development

The last semester was quite crazy for me as I had to work restlessly for my studies, which let me very little time to work on GNOME Games. That being said that doesn't mean nothing happened in Games land! Here is what to expect in the next versions of Games.

What will be new in 3.20

GNOME Games 3.19.90 just came out and brought with him some changes. Besides several small bug fixes, Games have been refactored, polished and hardened to be ready to receive more important features on the next release.


This is the biggest feature that have been added in this cycle.

Game formats in Games are handled by providing several types to handle them:

  • a Game to represent the games of that kind,
  • a GameSource to list the games of that kind (GameSource is a Game factory),
  • other classes could be added if necessary such as a Runner to run the games or a widget to display and control the games in the application's window.

Currently a game source gives its games, a game gives its runner and a runner gives its display.

In the previous stable version of Games, each of these classes existed directly in the application's code, meaning that the application had tons of format specific classes scattered all over its code and was explicitly handling each available game format. This couldn't scale well so we needed to make this even cleaner and more flexible and to do so a plugin system have been added every game format have been ported into its own plugin. Each of these plugins encapsulate the definitions of the GameSource, Game, and other helper classes corresponding to a single game format. Now the roles of each part of the code are clearer, better contained, and the application don't have an explicit list of available game formats but load them by looking at the available plugins.

Having plugins also have several extra advantages. A third party can create a plugin to support a new game format, put it in the right directory and bam, Games will magically support it! Another advantage is that you could disable support for systems you don't care about to make the application lighter, also some extra data that the plugins may need could be shipped directly with the plugin itself and not the application as a whole, making disabling a plugin even more efficient as they are self contained.

You can check the available plugins in the new Preferences window at the Extensions tag.

About dialog

Nothing fancy but we now have one. =)


Games can now be localized, don't hesitate to translate it in your language!

Work in progress

The most interesting stuff is to come. Here are listed features I started working on during the 3.20 cycle but didn't find the time to complete; now that I have some free time to work on them, you may expect them to land in 3.22!

Rich search

Currently we can search for games by their displayed title only. The plan is to make search richer by allowing to look for games by their format, genre, developer, publisher, release date...

We could even imagine crazier ideas such as searching by character names, the number of available player, etc..

Game identification

Most systems that Games handle or will handle have a more or less finite amount of games and no proper way to identify them: I'm talking about retro game consoles and handhelds. Often these game formats are very unconvenient to work with as they ship next to no metadata and are often available with hideous file names from which a title can't be easily guessed.

Some project like TOSEC and No-Intro started to work on a similar problem and produce databases relating fingerprints to well formatted file names.

I would like to have some way to identify a game and to get some useful information about it without having to scrap some online data base, and to empower such information to be more precise when looking for more data online. To do so I started working on a small XML based format called Gameinfo, used to link some game identifier (such as a ROM's fingerprint) to a game identity (mostly a title). I plan to ship such files embedded into the plugins they are related to and to use gettext to localize the games' titles.

Here is an example of a translatable Gameinfo file:

<?xml version="1.0"?>
      <_title>Super Mario World</_title>
        <rom md5="4f17a1a17a098d0a5312703b55ad134b"/>
        <rom md5="7bb0487eacdb78d6635e89d797e5ab74"/>
        <rom md5="cdd3c8c37322978ca8669b34bc89c804"/>

Most of it works on my local branches but the code needs some serious cleanup before being published. Also I don't want to use and release such a file format without proper tooling to easily create, edit and update such databases, particularly from TOSEC ou No-Intro data files.

Keyboard configuration

Lots of games like the ones from retro consoles only support gamepad-like inputs, though you may want to play a game even if you don't have such a device. To do so we can bind keyboard inputs to gamepad inputs, allowing you to create multiple mock-gamepads in the process to allow multiple players at the same time.

We still need to find a proper way to bind such mock-gamepads to a gamepad port on the emulator and to let you select which one you want to use for which player.

dimanche 31 janvier 2016

I'm joining Igalia!

On Monday February the First, 2016 I have the pleasure to join Igalia's WebKit team as an intern for the next five months. I will probably work on WebKitGTK+ and/or GNOME Web, but what's sure is that it will be fun and interesting! =D