On Sat, Aug 3, 2013 at 11:55 AM, Daniel Gillet <[email protected]>wrote:

> Hi Claudio,
>
>
[...]

I have one more question. In various tests, I see that the Layer has:
self.schedule(
> lambda x: 0 )
> I don't understand why that is. I tried to remove it and saw the FPS
> dropping dramatically. Would you be so kind to explain this one?
>
>
When there are not events pending nor callables scheduled pyglet drops the
frame-rate ; this is good for battery life.

In real code you will have things scheduled, so if cocos director was
started with vsync=True the app will run at the display refresh rate.

But short snippets may not need any concrete functionality scheduled; if
left without the self.schedule( lambda x : 0) the framerate would drop,
which causes animations to be choppy or practically in-observable.

So a do nothing function is scheduled only for the side effect of good FPS.

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cocos-discuss.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to