[OLPC-Games] (no subject)

jofate at jotaro.com jofate at jotaro.com
Tue Jan 8 23:24:15 EST 2008


> Only one request, any chance the 2x upscale blit function could
> wrapped up in a distutil package to make it more accessible for us
> less C++/Swig knowledgeable. Also if really speeds up low res games on
> the XO maybe it should be included in the XO's standard Python lib.
>
> Regards,
> Fredrik

Seconded.

I tried in pygame to do a similar thing -- render the scene to a low-res
surface, then scale it up for display -- hoping that it would run a bit
faster, but it was actually quite a bit slower.  One problem with this
approach is that pygame seems to require you to scale up to a fresh
surface each frame, then blit this surface to the screen; at the least,
this requires each pixel to be copied twice, which is likely killing the
framerate.  The pygame documentation implies that there is an optional
"DestSurface" parameter to the scaling function that might let you output
the scaled-up version directly to the screen's surface, but this parameter
appears not to be supported in the version of pygame that is on the XOs:

http://www.pygame.org/docs/ref/transform.html#pygame.transform.scale

I notice that there is a visualizer that plays whenever you play a .wav
file in the Browse activity (Totem plugin?) which runs full-screen at a
reasonable framerate while doing various particle/diffusion effects (and,
of course, playing audio); it seems to be using some sort of smooth
scaling to achieve its high framerate.  I'm not sure if this plugin is
doing anything special to achieve the scaling, but it would be great if
the builtin pygame library supported a similar mode.

-- Joe



More information about the Games mailing list