[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Capabilities of Pygame



On 1/12/2012 5:45 PM, Ryan Strunk wrote:
> Hello everyone,
> 
> -----[erased]----
> 
> Ryan
> 
> 
Hey, as a veteran programmer, what I can say about python's speed is
that it is sufficient to do a very many of things.

With python/pygame the only speed issues I have run into are:
* Programming Language issues that can be fixed with common sense (such
as appending to a huge list, which reallocates the whole thing and takes
forever)
* running a huge for loop
* printing lots of text (expect more than a hundred print's a second to
bring significant slowness)
* Pixel logic. Not gonna lie, python is not so good here. Small images
can be done at speed, but anything larger is a pain. (my computer
comfortably does 80x80)
* 3D -- I personally avoid using python for 3d. I've tried numerous
times to get pyopengl working and failed.



If you wish to use arrays, I suggest using numpy.
For image processing, I suggest scipy.

Maybe something else will help too.

If you look into multiprocessing to split stuff into separate threads,
beware and look carefully at instructions to keep your system from
crashing. It's easy to miss one of the crucial details and windows does
not have a barrier in place to stop infinite process generation.