On Sun, May 26, 2013 at 4:45 PM, Paul Pittlerson <[email protected]>wrote:

> Is it possible to set the framerate to a constant 60?

With vsync=False and schedule_interval cocos will show semi consistent fps
> on an idle window, although the fps will be more than what I set it to. For
> example setting pyglet.clock.set_fps_limit(60) will show about 140 fps.
>
>
set_fps_limit was working with pyglet 1.1.4 (at least in windows) , it
doesn't work anymore in 1.2


> However, if I move the mouse around just a little, the fps will go up to
> some crazy amount around 400, also CPU usage will increase dramatically.
>
>
>
On the other hand, with vsync=True the showFPS will be 30 regardless of
> what I set pyglet.clock.set_fps_limit to. When I use update(dt):print dt it
> seems to suggest that schedule_interval indeed updates the program as often
> as I set it to.
>
>
vsync = True takes precedence over set_fps_limit, so its okay that changing
set_fps_limit don't changes the observed fps.
30 is a bit low, and I seem to remember there was some pyglet report where
the observed fps was half the refresh date


> So my questions are: Is the FPS clock an accurate and/or meaningful
> measure? and is there a way to set it to some reasonable and constant
> amount higher than 30?
>
>
Generally speaking, the fps info was reliable. Constraining the fps was
less reliable; the best option usually setting vsync = True., which usually
gets you at least 60 fps.
In pyglet 1.2 that is the only working method.

In addition, the clock code in pyglet has been upgraded in 1.2 : they were
micro freezes in 1.1.4 that i don't see with 1.2

All this assuming you are running a real OS, not a virtualized one. (in
which case all bets are off)


> I use pyglet 1.1.4 with cocos 0.5.5, python2.7.5 32bit. (it's the only
> combination I could get to work for some reason)
>

Really you should be running 1.2, it has a number of bug fixes.
Why not try a new install for 1.2 and ask help in pyglet list if it fails ?
(remember to include OS and video driver info)

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to