From: David C. <D. C. <si...@te...> - 2000-06-08 23:11:18
|
> Does the speed limitation of the Python > interpreter mean that it runs at somewhat similar > speed on different-speed cpus? My guess about the source of the speed limitation is apparently incorrect. Running on the same system using HWSURFACE vs. SWSURFACE results in a huge speed difference, as you comment. Thus, the limitation in speed is due to SDL and/or pySDL. I suspect it's due to SDL, since running the C version of aliens without the frame rate limiter results in a similar jump when going from software to video memory. Nonetheless, you're right - different systems will play my pyAliens at vastly different speeds. The reason is simple. Sam's aliens is speed limited - it can never get above 50 fps, no matter how fast your computer is. This is The Right Thing. I chose not to port that section of code ( wait_frame() for anyone who wants to write a patch ), partially because I wanted to see how performance varied over different systems and different video flags, but mostly because I didn't want to bother learning Python timing techniques last night. You see, SDL has a timing-specific subsystem, but Mark has decided (rightly, IMO) not to incorporate that subsystem into pySDL, instead leaving timing issues up to the python library. I may write the appropriate code tonight; we'll see how motivated I am. David Clark si...@te... Preliminary pySDL documentation: http://www3.telus.net/futility/futility/docs/pysdl/index.html |