Window focus and fps

29 views
Skip to first unread message

Nitneroc

unread,
Jul 30, 2012, 8:00:05 AM7/30/12
to cocos-...@googlegroups.com
For performance testing, I have turned off vsync, and discovered this strange behaviour, I wasn't aware of before :

When my app starts, it runs at 600+ fps, which seems nice
when I give focus to another app, it stays at the same value
when I give the focus back to my cocos2d app, the fps drop to 70-90 fps. This is corrected by dragging the window around (the fps rise up to 600+).

Is this a known issue ? Is there a solution ?
I'll provide an example if needed.

I'm running cocos2d 0.5.0 and pyglet 1.1.4 on windows 7.

claudio canepa

unread,
Jul 30, 2012, 11:59:05 AM7/30/12
to cocos-...@googlegroups.com
 I don't remember a similar report.
pyglet clock was totally revamped in the 1.2 version, and it is much smoother than in 1.1.4
Could you give a try with pyglet 1.2alpha ?


Nitneroc

unread,
Jul 30, 2012, 3:16:24 PM7/30/12
to cocos-...@googlegroups.com
Problem Solved ! That was quick ;)

pyglet1.2alpha solved it. For a brief momen,t when app gets focus back, the FPS make a big drop, but they rise again just as fast.

Le lundi 30 juillet 2012 17:59:05 UTC+2, Claudio Canepa a écrit :

Peter Enerccio

unread,
Jul 30, 2012, 7:12:57 PM7/30/12
to cocos-...@googlegroups.com
Or you can write your own loop, since games usually run at full fps all the time, contrary to pyglet non cpu hogging which I find a waste. Games should hog cpu as much as they can, since you hardly multitask those.

2012/7/30 Nitneroc <corent...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "cocos2d discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cocos-discuss/-/UCp11nBFU38J.

To post to this group, send email to cocos-...@googlegroups.com.
To unsubscribe from this group, send email to cocos-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.



--
Bc. Peter Vaňušanik
http://www.bishojo.tk

Reply all
Reply to author
Forward
0 new messages