Re: Riot in aisle 800



Hi;

Le jeudi 24 mai 2007 à 23:36 +0200, Andreas Røsdal a écrit :
> This sounds like a very cool project! Too bad that I don't have a N800 
> to test it out? Do you have screenshots?

I've put some screenshots here:
http://www.gnome.org/~chpe/images/aisleriot-n800-toolbar.png
http://www.gnome.org/~chpe/images/aisleriot-n800-notoolbar.png
http://www.gnome.org/~chpe/images/aisleriot-n800-fullscreen-toolbar.png
http://www.gnome.org/~chpe/images/aisleriot-n800-fullscreen-notoolbar.png

> Is the patch intended for gnome-games SVN? (It's very large...)

I've uploaded my git branch, so you can also check out the repo with:
git clone http://www.gnome.org/~chpe/git/gnome-games.git/

I'd definitely like for this to go upstream, yes.

So let me elaborate a bit on what I've done:
* reworked configure to only check for the stuff that's needed for the
games that you're building
* refactored the code into a few GObjects: the Board class which handles
the drawing and dragging etc; the Game class which encapsulates the
scheme interface, the Window class for the UI.
* removed the glade dependency; the stats dialogue is now built from
code
* reworked the card theme loading and caching:
  * bug #337080 (svg card set takes too long to load); although this
    is blocking on updating the card themes. When using the Bellot theme
you can see the effect by setting the env var GAMES_CARDS_SUBRENDERING=1
(this slows down the other themes until they're fixed)
  * allow pre-rendered card themes with one image file per card per
size, since librsvg isn't feasible on the N800 (it's slow-ish even on
the desktop, even with the fix for the bug above)
  * only cache the pixmaps, not the pixbufs _and_ the pixmaps
(GamesCardPixmaps cached the pixmaps for the pixbufs which
GamesCardImages caches)
* updated card drawing: previously aisleriot would redraw the whole
board into a pixmap on any change, and then copy that pixmap to the
screen on expose. That turned out to be rather slow for the device; so
I've changed it to draw from the expose event directly without an
intermediate pixbuf, and only expose the areas that have really changed
* fixed drawing artifacts (very noticeable with the Ornamental theme at
high sizes)
* introduce a new 'pixbuf drawing' mode which draws the card pixbufs
directly instead of converting them to pixmaps; this looks smoother
(esp. with Ornamental) since it's full anti-aliasing, not just 1-bit
transparency on the card edges. However it turned out to be too slow for
the device; but I left it in for the desktop :)
Set the env var AISLERIOT_PIXBUF_DRAWING=0 or 1 to see the effect; or
build with CFLAGS+="-DENABLE_DEBUG_UI" for a convenient toggle in the
menus.
* changed click-to-move mode to be more adapted to the device: instead
of using click to pick up the card that would then move around as you
move the mouse, I added a 'selection' mode which selects the clicked
card(s), and then drops them on the stack you click next on (if
possible, of course)
* as a by-product, a gtk-only mode without the libgnome dependency (but
with librsvg dep, of course)
* much bugs fixed along the way (some of which were immediately
applicable on the old codebase I filed already on bugzilla and they're
applied already)
* added the changes for the Maemo platform, of course.
* many more things I've forotten about :)

I realise such a big patch always introduces the possibility of new bugs
and regressions, but in my testing both on the device and on the
desktop, it's been very stable. I'd like everyone to test it; either
download the tarball from
http://repository.maemo.org/extras/pool/bora/free/source/g/gnome-games/
or clone the git repo. Configure with "--with-platform=maemo
--with-games=aisleriot" (in scratchbox); or "--with-platform=gtk-only
--with-games=aisleriot" (to build the gtk-only mode); or just without
any flags (--with-platform defaults to 'gnome').

Should you find any bugs that are in my version but not in upstream,
please let me know; but don't file them in bugzilla, of course.

Regards,
	Christian





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