Marc Solitaire Postmortem


Originally when I published Marc Solitaire I had an FAQ question: "was the port a good idea?" The answer was no. So what went wrong?

The bad stuff

Solitaire is complicated

Turns out Solitaire - like all card games - is deceptively complicated. For example how do you detect an end-of-game in Freecell and Klondike and how do you write that in Scheme? Turns out Aisleriot also doesn't have code for that.

Apple library bundling is a manual process

Apple provides this helpful page on bundling dynamic libraries with apps. It's a detailed and manual process. Even once the dynamic libraries are modified, GTK/Linux/*nix libraries still expect certain non-library files  in particular places. So environment variables must be modified. This process is so complex, I don't hold much hope for people compiling the code on their own unless they copy the libraries from a working binary.

C is awful

A bit of an exaggeration but GTK programming in Python is actually a decent experience. It's a shame GNU really never embraced a solid modern language. GTK also faces from the fact it is constantly deprecating technologies and replacing them with new ones. All platforms do this but GNOME/GTK more-so. There are menus in Gtk and menus in Gio for example.

Apple Help Books are neglected

The documentation for Apple help books is woefully out-of-date as is the technology behind it. So most programmers spend a lot of time working it out on their own...or just use their own help system.

Schemas for settings are strange and that one bug

Having GLib fall over if it doesn't have a compiled schema for settings is strange. But the bug that drove me crazy the most was the need to call:

g_main_context_wake(g_main_context_default());

After each menu choice or the screen would not update until the mouse was moved. I still don't understand what that code does. And just so you know GNOME doesn't have a monopoly on challenging developer experiences there is Apple's Error message "could not build module 'Foundation'". Over eight years, it has attracted many Stack Overflows and many different answers. Your solution is probably different yet again - although it's probably reinstalling Xcode.

The good stuff

GTK/Quartz is getting better

For a massive undertaking, it's cool to finally have Inkscape on macOS. GTK/Quartz is also mostly a light touch. So I could easily add macOS about dialogs or add CoreFilter effects to my window or fireworks to my end-of-game.

GNOME does SVG right

Apple still really only views SVG as belonging in the browser. It still doesn't have SVG icons. GNOME does and it rocks!

Chris's cards rock!

Chris's cards are simply beautiful for classical playing cards. I only wish he built us some beautiful card backs too.

With Aisleriot I never worried about layout, dragging or undos

It's easy to dwell on the headaches with a port. But I never worried about layout, dragging or undos and those two are things that could have driven me crazy if I built my own.

The uncertain stuff

Just one item here. I'm not sure how I feel about GUILE/Scheme. The code is all set-up for me to write my own scheme now and solve some of the big missing bits in Aisleriot:

  • Proper end-of-game detection for Klondike and Freecell
  • Auto-piling to finish off Klondike games for the user
  • Slight pauses when Freecell moves a card for you

But I reserve judgement on whether Scheme is the best language to do this in.

Files

marc-solitaire.arm64.zip 22 MB
Mar 31, 2023

Get Marc Solitaire

Leave a comment

Log in with itch.io to leave a comment.