Reducing pygame cpu-load to < 4 %

Noah Kantrowitz kantrn at rpi.edu
Sun Dec 9 19:08:50 EST 2007


Unfortunately this is not possible in most games, as doing them purely
vector-based is infeasible. A lot of the artwork made for games will be
standard raster graphics, and will need to be designed for a specific
screen. If there are changes in the future, they can always be redrawn.

--Noah

Bernardo Innocenti wrote:
> On 12/09/07 18:35, Roberto Fagá wrote:
>
>   
>> Another good option to optimize games in PyGame on XO is to reduce the
>> depth of the colors on:
>> window = pygame.display.set_mode((400, 225), 16)
>>     
>
> Isn't 16bpp the default?
>
> The X display runs at 16bpp, so using any other depth causes
> useless and very expensive runtime conversions.
>
> Application and game developers should avoid assuming a
> particular screen resolution and depth.  These apparently
> fixed properties are in fact subject to change in future
> generations of the XO, and may already be different in
> emulated environments.  Moreover, people are already porting
> Sugar to different hardware than the XO, including regular
> Linux distributions.
>
> It is therefore wise to *always* query screen properties
> at run-time and load/render graphics in the correct format.
> Cairo makes it extremely easy.
>
>   


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://lists.laptop.org/pipermail/devel/attachments/20071209/29cf2e82/attachment.sig>


More information about the Devel mailing list