[Sugar-devel] [ANNOUNCE] Sugargame v1.0

Wade Brainerd wadetb at gmail.com
Sat Nov 21 12:51:19 EST 2009


http://wiki.sugarlabs.org/go/Development_Team/Sugargame

== Sugargame ==

Sugargame is a Python package which allows [http://www.pygame.org/ Pygame]
programs to run well under Sugar.
It is fork of the olcpgames framework, which is no longer maintained.

http://git.sugarlabs.org/projects/sugargame

What it does:

* Wraps a Sugar activity around an existing Pygame program with few changes
* Allows Sugar toolbars and other widgets to be added to the activity UI
* Provides hooks for saving to and restoring from the Journal

==== Differences between Sugargame and olpcgames ====

The olpcgames framework provides a wrapper around Pygame which attempts to
allow a Pygame program to run mostly unmodified under Sugar.  To this end,
the Pygame program is run in a separate thread with its own Pygame message
loop while the main thread runs the GTK message loop.  Also, olpcgames wraps
Sugar APIs such as the journal and mesh into a Pygame-like API.

Sugargame takes a simpler approach; it provides a way to embed Pygame into a
GTK widget.  The Sugar APIs are used to interact with Sugar, the Pygame APIs
are used for the game.

Sugargame advantages:

* Simpler code
* More elegant interface between Pygame and GTK
* Runs as a single thread: no thread related segfaults
* Possible to use Sugar widgets with Pygame

Sugargame limitations:

* No support for Pango or SVG sprites (yet)

========================================

See the Wiki page for usage information and examples.

A port of Physics to Sugargame exists at
http://git.sugarlabs.org/projects/physics/repos/wadebs-clone.

My hope is that Physics and other olpcgames-based activities will
migrate to Sugargame, and that more hybrid PyGTK + Sugargame
activities will appear.

Best,
-Wade


More information about the Sugar-devel mailing list