[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Pygame/Python efficiency/performance tests?




Hi,
Nice article about SDL and Pygame. Good to see everyones project getting
a mention.

Problem:
ive been getting some reports that the mouse cursor flicker in Pyzzle
with slower machines. I had another look over my game loop and found
that my
get_hotspot_map() and
get_mouse_cursor()
functions were being reloaded for every mouse event. Talk about
inefficient.

Ive reworked Pyzzles main game loop so that these functions only get
called when necessary. But because my machine is quite zippy (850Mhz
Duron. 128MB ram, redhat 7.1) I am finding it difficult to detect the
difference in performance. Is there anyway to _safely_ slowdown python
or can anyone recommend a good performance tester?

The other thing is I want to say sorry for this post I made a few weeks
ago:
"""
Hello,
I think an get_onMouseUp() function would be an excellent addition to
the pygame.mouse.
This function obviously returns true when a complete mouse click has
been made, button down then button up.
I know its easy to write one and have done so. But I think it would be a

good addition.
Rock
Andy
"""
I just noticed the 'MOUSEBUTTONUP  pos, button.'
in the pygame events doc. I must have looked at that page a dozens of
times but never noticed it. Apologies to all. I'm such a donk.
DIIIIIIIIIIIIIIIRRRRRRRRRRRR, good one Andy.

Any ideas about the above.
Thanks
Andy


Pygame/Python efficiency/performance tests?

Hi,
ive been getting some reports that the mouse cursor flicker in Pyzzle
with slower machines. I had another look over my game loop and found
that my
get_hotspot_map() and
get_mouse_cursor()
functions were being reloaded for every mouse event. Talk about
inefficient.

Ive reworked Pyzzles main game loop so that these functions only get
called when necessary. But because my machine is quite zippy (850Mhz
Duron. 128MB ram, redhat 7.1) I am finding it difficult to detect the
difference in performance. Is there anyway to _safely_ slowdown python
or can anyone recommend a good python performance tester?

The other thing is I want to say sorry for this post I made a few weeks
ago:
"""
Hello,
I think an get_onMouseUp() function would be an excellent addition to
the pygame.mouse.
This function obviously returns true when a complete mouse click has
been made, button down then button up.
I know its easy to write one and have done so. But I think it would be a

good addition.
Rock
Andy
"""
I just noticed the 'MOUSEBUTTONUP  pos, button.'
in the pygame events doc. I must have looked at that page a dozens of
times but never noticed it. Apologies to all. I'm such a donk.
DIIIIIIIIIIIIIIIRRRRRRRRRRRR, good one Andy.

Any ideas about the above.
Thanks
Andy