Hello. My game runs nicely at about 40fps. That's before after about a
minute, it suddenly drops to about 10-20fps for another minute
(Doesn't have to be a minute).

I've used the hotshot profiler and I get this information:


 ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      467    8.791    0.019    8.804    0.019 __init__.py:616(flip)
      467    4.143    0.009    5.875    0.013 scalelib.py:
548(game_loop)
        1    0.636    0.636   15.532   15.532 carbon.py:50(run)
     2348    0.340    0.000    0.486    0.000 exceptional.py:
62(glDeleteTextures)
      178    0.244    0.001    0.257    0.001 scalelib.py:419(render)
        1    0.169    0.169    0.198    0.198 scalelib.py:
357(__init__)
      427    0.117    0.000    0.200    0.000 scalelib.py:311(blit)
     2832    0.105    0.000    0.349    0.000 wrapper.py:
776(wrapperCall)
    45195    0.084    0.000    0.084    0.000 darwin.py:
73(safeGetError)
81744/28128    0.069    0.000    0.069    0.000 constants.py:
42(from_param)
        1    0.052    0.052    0.454    0.454 main.py:1574(transfer)
    45195    0.046    0.000    0.130    0.000 error.py:
182(glCheckError)
      161    0.045    0.000    0.047    0.000 scalelib.py:
412(__init__)
4696/2348    0.039    0.000    0.078    0.000 lists.py:122(asArray)
        1    0.033    0.033    0.041    0.041 main.py:823(transfer)
    28904    0.033    0.000    0.166    0.000 wrapper.py:
335(calculate_pyArgs)
      467    0.033    0.000    5.908    0.013 clock.py:253(tick)
    15832    0.031    0.000    0.031    0.000 arraydatatype.py:
28(__call__)
      132    0.030    0.000    0.030    0.000 __init__.py:
1085(_get_mouse_in_content)
     2832    0.030    0.000    0.050    0.000 images.py:
71(rankPacking)

Does this mean the flip method is a problem? What could be the
potential problems? What parts of the code should I show because I
have massive amounts of code. The flip method is the window.flip
method for pyglet.

I was thinking about rewriting parts of pyglet to use Cocoa with
PyObjC instead of Carbon. Would this help or am I looking the wrong
way?

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" 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/pyglet-users?hl=en.

Reply via email to