Development Team/Sugargame: Difference between revisions

add fix for keyboard focus to generate pygame keypress events
move ancient history to end of page
Line 12: Line 12:
* Allows Sugar toolbars and other widgets to be added to the activity UI
* Allows Sugar toolbars and other widgets to be added to the activity UI
* Provides hooks for saving to and restoring from the Journal
* 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)


== Using Sugargame ==
== Using Sugargame ==
Line 128: Line 105:
the One Laptop per Child project.
the One Laptop per Child project.


=== Changelog ===
== Changelog ==


====v1.1====
===v1.1===
* Fix bugs in event handling.  (Pablo Moleri)
* Fix bugs in event handling.  (Pablo Moleri)
* Remove reference to gtk.Socket.get_window() method, which is missing in older versions of PyGTK.
* Remove reference to gtk.Socket.get_window() method, which is missing in older versions of PyGTK.


====v1.0====
===v1.0===
* Initial version of Sugargame
* Initial version of Sugargame
== 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)