maraoz / galaktia

Space MMORPG student project
0 stars 0 forks source link

Low FPS in low-end machines #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Even though graphics on Galaktia are simple tiles and images, low-end
machines may have some problems due to (questionably) a bug in Intel
drivers (defaults vsync to "True") that slows Pyglet down. In fact, you
will get no more than 0.33 fps at 60MHz refresh rate.

Suggestion:
Make Galaktia auto-detect low-end cards or low-fps and force vsync to "0"
to improve performance.

Example code:
 import pyglet
 win = pyglet.window.Window()
 clock = pyglet.clock.Clock()
 @window.event
 def on_draw():
     # Here be dragons (and draw functions)
     fps = clock.get_fps()
     if (fps > 0 and fps < 30):
         win.set_vsync(False)

Original issue reported on code.google.com by rhfi...@gmail.com on 20 Aug 2009 at 12:51

GoogleCodeExporter commented 9 years ago
Since pyglet is deprecated as UI framework, this issue does no longer apply.

Original comment by santiago.coffey on 21 Apr 2010 at 5:35