New and Familiar

Mat's blog on GNOME

One Year of Mahjong Solitaire

I’ve always liked the concept of small five-minute games to fill some time. Puzzle games that start instantly and keep your mind sharp, without unnecessary ads, distractions and microtransactions. Classics like Minesweeper and Solitaire come to mind, once preinstalled on every Windows PC. It was great fun during moments without an internet connection.

Unsurprisingly, GNOME provided a collection of similar games since its initial release, preinstalled on several Linux distributions. Although GNOME no longer ships an official game collection, its games live on as separate modules on GNOME GitLab, and I’ve continued playing some of them to this day.

O maintainer, where art thou?

Unfortunately, several games have become unmaintained in recent years. While the games more or less work as expected, users still send occasional feature requests and bug reports that remain unanswered, and the UIs drift further away from modern standards (GTK 4 + libadwaita) each year.

One game stuck in an unfortunate state was Mahjongg (a Mahjong Solitaire clone), suffering from issues such as high CPU usage and freezes when playing the game. While fixing the issues was easy enough, distributing the fixes proved more difficult, with nobody left to include them in a new release.

One year later

After unsuccessfully hunting for poor souls willing to make a new release, my journey as Mahjongg’s new maintainer began a year ago. While my initial plan was to make a single release fixing critical bugs, modernizing the UI and fixing other long-standing issues turned out quite fun in the end. Here are some of the highlights since then:

  • All old issues/feature requests addressed and closed (some dating back over a decade)
  • Several improvements contributed by users (sequential/random layout rotation, remembering game state between sessions)
  • Fixes for various bugs and memory/resource leaks
  • Performance improvements, avoiding several seconds of delay when starting the game and changing layouts
  • Modernized Scores dialog and other UI/UX improvements, following the latest GNOME Human Interface Guidelines
  • Improved tile reshuffling that avoids unsolvable tile arrangements when possible
  • Tile drawing ported from Cairo (CPU-based) to GtkSnapshot (GPU-based), for more efficient drawing and less work porting to GTK 5 in the (far) future

A game of Mahjongg on the Turtle layout

Applying for GNOME Circle

It’s perhaps no secret that the old GNOME games are stuck in an awkward place, with some still using legacy GNOME branding despite no longer shipping with GNOME. In search of a better future for Mahjongg, I applied for its inclusion in GNOME Circle, a collection of high-quality apps and libraries that extend the GNOME ecosystem. After good initial impressions, thanks to recent modernization efforts, Mahjongg is on track for inclusion.

Since GNOME Circle currently lacks other games, I would love to see more small games added in the future, whether it be one of the old GNOME games or a completely new one. While it’s up to each maintainer whether or not they want to go through the effort, high-quality games deserve more exposure. :)

Closing words

Thanks to both the Release Team and the Infrastructure Team for helping me get started, as well as everyone who has contributed to Mahjongg so far. Thanks to everyone who helped write the GNOME Project Handbook, making the lives of contributors easier.

A few GNOME games are still unmaintained and use GTK 3:

If you enjoy a challenge, and are interested in porting a game to GTK 4 + libadwaita and maintaining it, perhaps this is the opportunity for you!

Download Mahjongg

Get it on Flathub

Comments

15 responses to “One Year of Mahjong Solitaire”

  1. Han Avatar
    Han

    I’ve been testing all your updates, straight from git, and it has been a wonderful year watching the subtle changes. Mahjongg now looks much better. I can still recall the moment I watched the build finish without warnings! Thanks for your work!

    1. Mat Avatar
      Mat

      Thank you, Han!

  2. Michael Catanzaro Avatar
    Michael Catanzaro

    Nice update! Great to see Mahjongg being cared for.

    1. Mat Avatar
      Mat

      Thanks Michael!

  3. Andrey Avatar
    Andrey

    Seeing those games unmaintained makes me sad. They may not be that exciting as some modern games but they are the history (well maybe 2048 isn’t that old but the rest are) and have a space in my heart. Some time ago I stepped in and migrated GNOME Robots (they are still Gnobots2 for me) to Vala and later to Rust. I am happy to contribute to it (and potentially other games) but qualifying to GNOME Circle is something I’d like to do but am afraid not having enough time to press all the knobs.

    Does it make a sense to have a collaborative effort to bring games back to GNOME (Circle)?

    1. Han Avatar
      Han

      I just built and installed it, works great! Thanks!

    2. Robert Avatar
      Robert

      Given that we seem to be at least 3 persons caring for the small and old GNOME Games, maybe the collaborative effort sounds really good. (I am the one “sortof” caring – maintaining – for lightsoff, swell-foop, five-or-more, gnome-mines), and it just made me sad to see Quadrapassel and 2048 on the unmaintained list :(

      1. Mat Avatar
        Mat

        I could help with small patches here and there, but I ultimately had to focus on one game due to other responsibilities. It would be great to have more people give these games some love.

    3. Mat Avatar
      Mat

      While some degree of collaborative effort would make sense, I think the ideal situation would be having more maintainers that really care about one or two games and can spend the time required on them. Sudoku and Nibbles are good examples.

      The reason we ended up with this list of unmainained games (except for Quadrapassel) is because the one person who maintained all of them left. Spreading too thin again is probably not a good idea.

  4. Delgarde Avatar
    Delgarde

    I do play the Mahjongg game quite a lot, so thank you for taking care of it.

    1. Mat Avatar
      Mat

      Thank you! Glad to see someone enjoy it.

  5. lof Avatar
    lof

    Thank you soo much! I remember playing it when i was new to Linux and had a small sluggish netbook to play on.

    Time to play again!

    1. Mat Avatar
      Mat

      Have fun!

  6. Andrey Avatar
    Andrey

    Ok. You’ve motivated me and I did a port of Reversi/Iagno to GTK4+libadwaita: https://gitlab.gnome.org/GNOME/iagno/-/merge_requests/29

  7. Mello Avatar
    Mello

    Hi all, please consider adding GTK4 & GTK3 games to this list.

    https://github.com/valpackett/awesome-gtk

    Probably best to create a pull request for them.

    The list is excellent for applications, but incomplete for games.

Leave a Reply to Andrey Cancel reply

Your email address will not be published. Required fields are marked *