Animation/Python/PyGames vs battery charge

Noah Kantrowitz kantrn at rpi.edu
Mon Jan 28 16:41:13 EST 2008


Kent Loobey wrote:
> I have set up some test animation code.
>
> Normally games try to take all the cycles they can get.
>
> I am trying to preserve as much battery energy as I can.
>
> So I am setting a specific frame rate and sleeping beyond what it takes to 
> maintain that frame rate.
>
> Do you think this will actually reduce the drain on the XO battery?
>
> In other words "What does the XO do when apps sleep?"
>
>   

If SDL is actually using a real timed sleep, it would help, but I don't 
think it does. This is often too inaccurate for games, so we may need to 
look at that ourselves. Because pygame is polling driven (instead of 
using async callbacks like GTK) it is unlikely that it will ever get as 
nice a battery life as GTK-based activities.

--Noah

-------------- 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/20080128/e6b37b83/attachment.sig>


More information about the Devel mailing list