Animation/Python/PyGames vs battery charge

Rózsás Gödény rozsas.godeny at gmail.com
Wed Jan 30 03:04:27 EST 2008


Hi

> I suspect that the best thing you can do to reduce power is to make
> sure that your game doesn't do anything when it isn't the frontmost
> thing on the screen.  I.e. if the window that you're drawing in is
> totally obscured, then don't run ANYTHING -- no game animations, but
> also no background world-simulating stuff, and little or no network
> activity.  Resume activity once the user brings your game to the front
> again.  Don't wake up periodically and do anything; be sure to do
> NOTHING.
>
> Ensuring this background-idle behavior will not only allow the
> activity that's frontmost to get 100% of the CPU cycles.  It will also
> allow the XO to suspend and power down if that frontmost activity goes
> idle.  (If you're chewing up CPU in the background, the system won't
> auto-suspend.)
>

Maybe sugar could suspend those activities which are in the background
so the activities don't have to worry about it. Also it would be fool
proof.

-- 
Rózsás Gödény



More information about the Devel mailing list