[OLPC-Games] newbie on Sugar with questions

Lincoln Quirk lincoln at techhouse.org
Thu Jun 21 14:06:59 EDT 2007


On Thu, Jun 21, 2007 at 10:19:47AM -0700, Daniel Monteiro wrote:
> The question is: is there any way to create a activity from a SDL
> application?  Whatever is the answer, any hint on how can I do this
> BZK Logo application? ("activity-wannabe")

Sure, you could do this. You would be using the SDL_WINDOWID hack to
embed it into the Activity context, which means that you would also
(maybe) have to forward events from GTK to SDL somehow. It's not really
pretty. We did all this for Pygame, and that method of embedding Pygame
applications will probably be supported, so I suspect much of it could
be reused.

However, from a more philosophical point of view, using SDL prevents you
from easily using much of the code that's already there -- Pango, Sugar,
D-Bus, and so on. So you could make a game that would run, but it would
probably not behave very much like most Activities. 

Still, I'm sure we'd be excited to see your stuff running on the XO.
An article about Activity packaging can be found at 
http://www.redhatmagazine.com/2007/03/26/building-the-xo-the-anatomy-of-an-activity/

For more semi-related information, see the following wiki page:
http://wiki.laptop.org/go/Game_development_HOWTO

You may be interested in downloading the code from Coderanger's SVN
linked off that page, because it is an example of how to use
SDL_WINDOWID as part of a Sugar activity. 

Good luck!

Lincoln Quirk



More information about the Games mailing list