libgames-support



Hi games developers,

Today I cleaned up some remaining issues with the libgames-support API,
based on problems discovered when using it in Nibbles, Robots, and
2048, updated those games to use the new API (I tried not to break
anything ;) and closed a couple blocker bugs. I think the library is at
long last in a releasable state. If you think there are still problems
with the API, please let me know or file a bug, because otherwise I'm
not planning further changes!

I was originally planning to do the first stable release in tandem with
GNOME 3.18, but it is waaaaaaay too late in the cycle for that. So
instead, I am planning to do the first development release alongside
3.18 instead. Then, in case we find any more problems during the next
cycle, we have another six months to break the API before we lock it
down and start using it in all the games.

The value of doing a development release now, instead of alongside
3.19.1, is that 2048 already depends on it, and it's inconvenient for
distros that have packaged 2048 to have to package a git snapshot of
libgames-support, which is too much of a moving target.

What's left to fix? The bugs: https://bugzilla.gnome.org/buglist.cgi?qu
icksearch=product:"libgames-support"

One bug is tracking the games that still need to be ported. One blocker
bug complains about the formatting of time scores, but none of the
current games use time scores, so it doesn't matter yet. The other bugs
are enhancement-severity. Notably, we don't yet have the ability to
import scores from the original games (bug #745489, bug #745490), so
users are going to lose scores when we make this switch. That already
happened for most games when they were ported from C to Vala a few
years ago, but it would be nice to not do that again.

A status update on the games using the library already: GNOME 2048 is
using it in master. GNOME Robots is using it on the wip/libgames
-support sidebranch, but not yet in master. GNOME Nibbles is using it
on the wip/vala sidebranch, not yet in master. GNOME Mines used it on a
sidebranch at one point, but the code has not been updated in so long,
it will probably be easier to start over with it from scratch. The
other games aren't using it yet.

Features of the library: it handles scores for you, so your game
doesn't need to implement its own scores tracking. It includes a Vala
implementation of GamesGridFrame, so we don't have to keep a copy of
that in each game anymore. It includes a coding style checker by Sahil
Sareen, which GNOME Chess and the wip/vala branch of GNOME Nibbles are
already using. Just plop something like this into your autogen.sh and
the style checker will be set as your pre-commit hook if it's present,
or ignored otherwise:

if [ -d $srcdir/.git ] && [ ! -e $srcdir/.git/hooks/pre-commit ]; then
        ln -s ../../../libgames-support/style-checker
$srcdir/.git/hooks/pre-commit && echo "Enabled pre-commit style
checker." || :
fi

Thanks a bunch to Nikhar Agrawal for writing the library originally,
and Sahil for writing the style checker. Also thanks to Juan for
hooking it up in 2048, and Iulian for doing so in Nibbles.

Michael


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]