Current best practice for sugarizing existing Linux games? (was: Games depending on OpenGL and GLX - any way to test on XO with regular OLPC image?)
Kent Dahl
kentda at pvv.org
Sun Jun 15 05:04:28 EDT 2008
On sø., 2008-06-08 at 10:37 +0200, Kent Dahl wrote:
> P.S.: So far, I've been pleasantly surprised how well these games work
> on it:
> * Ri-li - excellent toy-train game http://ri-li.sourceforge.net/
> * Frozen-Bubble
> * FizzBall demo (commercial)
> * Biniax2
I'm looking into "sugar-coating" some of these games, creating lanchers
for them, and I am curious as to what the current best practice is?
I've looked into libsugarize (using .so and script), but found that it
would frequently hang the activity on the Sugar activity "cake" diagram,
so you couldn't restart it. Looked closer at TuxPain, xlogo etc without
getting much wiser.
Launching it directly from a small Python Sugar Activity works fairly
well, but has similar issues. I can't call gtk.main_quit() in the
__init__, so that works best when you have a separate Sugar UI with a
"Launch" button, making it async. (Getting threads in there to handle
that just seems messy.)
Calling Activity.close(self) from __init__ would work after a
os.system() call to fire of a game, but only if I gave it a second
("sleep 1" in bash script) to catch up. It also had the side-effect of
pushing out the Sugar toolbar borders, but that is a minor
inconvenience.
For now, I've just kept using a very simple Sugar activity with buttons
to launch various games. The os.system() call will hang the Activity,
and thus cleanup seems to work fine. Only one game can be launced at a
time, but given XO performance that is just as well. Available as
SpillDill-1.xo at: http://www.pvv.org/~kentda/olpc/filer/
--
Kent Dahl <kentda at pvv.org>
http://www.pvv.org/~kentda/
--
Kent Dahl <kentda at pvv.org>
http://www.pvv.org/~kentda/
More information about the Devel
mailing list