On Wed, Aug 5, 2009 at 8:30 PM, quano <[email protected]> wrote:
>
> I was playing around a little bit in hello world, and noticed it had
> horrible framerate. At first I thought I had done something to break
> it, but then I ran the original example, but with framerate, and it
> turns out it drops to as low as 4 fps. Other demos do not. Why is
> this?
>
> (I just added cocos.director.director.show_FPS = True to init in
> helloworld)
>
Because in the absence of events and schedulled actions pyglets spare the
call to draw.
You can see that by adding an empty update method to the HelloWorld class
and schedulling it. By example, adding
self.schedule(self.update)
def update(self,dt):
return
after the current end of HelloWorld.__init__ method.
( note that the first line belogs to the __init__ method )
By the way, the update method will be called once per frame )
--
claudio
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---