[Tutor] total newbie
Michael Cole
MichaelCole1234 at comcast.net
Wed May 11 12:33:59 CEST 2005
WARNING: TOTAL NEWBIE QUESTION BELOW
Had to warn ya, I just finished reading a book on learning python for beginners and decided to write a small game program as an exercise. The game I wrote was breakout (in case you dont know it, its a very simple game where there is several rows of bricks in the upper portion of the screen and a paddle at the bottom, a ball bounces around destroying bricks...) I used pygame for all of the graphics, sprites, collision, etc...
What I noticed while testing the program is that the ball moves fairly slowly, I tried incrementing the ball's speed (dx and dy) but it still seemed to move pretty slow no matter how much I increased its speed. I went ahead and played out the game, destroying bricks (sprites, 128 of them). As the number of remaining bricks decreased the ball's speed increased, dramatically.
so i guess what I want to know is, is python normally this slow when dealing with such a small number of objects? or is this something particular about pygame's handling of sprites? and, if this is something intrinsic to python, can anything be done to speed it up? I realize python is an intrepeted language but this seems almost useless for any decent number of objects....
Thanks in advance.
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050511/ccdf3afb/attachment.htm
More information about the Tutor
mailing list