GCompris in sugar ?
bruno.coudoin at free.fr
Thu Feb 1 18:14:56 EST 2007
Le jeudi 01 février 2007 à 17:09 -0500, Marco Pesenti Gritti a écrit :
> On Thu, 2007-02-01 at 21:15 +0100, Yves Combe wrote:
> I guess my question is... would it possible to integrate GCompris, or
> some of the GCompris boards with sugar as activities (which doesn't
> necessarily imply mesh support)?
> I think it's by far a more interesting question, and I'd love to see it
If you have the gnomecanvas and it's python bindings, then one approach
could be to port GCompris python boards as sugar activity. This means,
also creating a subset of the GCompris core in python.
Let's take a real exemple, the electric activity
This activity requires the gnucap binary, the python gnomecanvas and
calls these functions from the GCompris core:
Our control bar is part of the core, we use it display the difficulty
level. The bar could be rewritten in python or removed and we could
replace this by sugar interactions.
This set the background image. its a couple lines of code to rewrite
this in python.
gcompris.utils.load_pixmap() (90% of the calls)
The most used function, it just load an image from disk. One line in
python to do the same.
We have a skin system, that can be simply skipped by using fixed path in
Display an image that looks like a modal dialog box. easy to rewrite one
but can be removed, it's mostly use for error case that should not
happen on a close system like the olpc. There is perhaps a central
console in sugar that could get these messages.
Display a cute image as a bonus, can be rewrite easily or removed.
It's a few lines of code in C/GTK to to this, it is probably more easy
to do in python. Can be skipped.
As you see, we are not so dependent on GCompris core. Just providing a
python load_pixmap() equivalent and commenting the other functions
should be enough to have a functional and independent electricity
Clearly, this path is a fork and we won't share code but if this can
bring some nice activities to the OLPC, on our side, we will support
There is another slightly different approach, we could add a native
python GCompris core API so that we will stay close in most cases.
http://gcompris.net Free educational software for kids
http://toulibre.org Logiciel Libre à Toulouse
More information about the Devel