[OLPC-Games] PyGame is go!
kent_quirk at cognitoy.com
Thu Apr 5 00:23:17 EDT 2007
Thanks to some work by John Palmieri, SDL and PyGame work on the XO, and
today we demonstrated several existing PyGame games running without
changes, including sound, graphics, keyboard, and mouse input.
Furthermore, he's working on integrating it all into the build, which
includes removing several extraneous dependencies. It's only a short
time until we have at least a base version available for others to
experiment with. There will be some ongoing work to remove excess
libraries and to integrate it properly with GTK and with Sugar. But
we're now comfortable that it's going to be reasonable to develop games
using the PyGame toolkit.
So please, feel free to start creating! This will definitely be the
"preferred" game development platform for the OLPC laptops.
We're attempting to define an entire game creation "stack" of capabilities.
At the bottom is SDL, which is accessible as libsdl in the usual ways
from C/C++. It's useful for porting existing applications.
On top of SDL lies PyGame, which exposes most of SDL to Python programmers.
Both PyGame and SDL will be trimmed down to remove support that isn't
applicable, while attempting to avoid breaking the existing APIs.
(Example: asking for a list of possible video modes might only return a
single mode -- but we won't remove the mode selection API because to do
so would break some existing SDL games).
Parallel to SDL will be additional game-oriented support libraries for
using the hardware specific to the OLPC laptops, such as the camera, the
microphone, the mesh network, and so forth.
And on top of all of that we hope to create several general-purpose game
engines and python libraries for making it easy to build simple games in
various categories. Under consideration are things like:
* An adventure game engine
* A basic arcade game engine
* A basic board game engine
* A few widgets for the creation of straightforward UIs
* Libraries for doing things like player matching for two-player and
multiplayer games on the mesh, support for the camera as an input
device, and so forth.
So...if you have ambitions to make games for OLPC, please start thinking
about PyGame. You can easily get PyGame running on every major desktop
When you think about it, please keep in mind some of the limitations of
* Processor speed is low compared to modern desktop PCs. Don't make
games that depend on a known processor speed for performance. In fact,
consider inserting a call something like pygame.time.delay(100) into the
main loop; if the game still plays well like that you've done it right.
Yes, we realize this limits things like high-frame-rate arcade games.
But high-frame-rate arcade games that hog the CPU also chew through
battery life. Some of those might be fun...but we also need games that
run at a more sedate pace.
* There are going to be interesting performance issues with the screen;
we'll likely be doing work to make it easier / faster, but if you're
manipulating colors of objects it might be slow or it might give you
strange results. Stay flexible if you can on screen size.
* Keep 'em small and light in terms of assets (sound, art). Disk space
is at a premium.
Please keep an eye on the Game development page on the wiki, along with
the pages for SDL Implementation and PyGame Implementation. We'll be
building those out over the next couple of weeks.
All the best,
Kent Quirk I'm making a game about global warming.
Game Architect Track the progress at:
More information about the Games