From: Peter N. <pn...@ya...> - 2000-06-29 06:58:25
|
--- Pete Shinners <pe...@sh...> wrote: > ok, i've finished my first decent version of python > flame! > > i've left enough comments in the actual source, but > to help > discussion... the program runs at about 15fps on my > celeron > 400 with a TNT2. currently, about 60% of the running > time > involves transferring the image the numeric python > array > to the sdl surface. > it runs around 29-30 on a PIII 700 in Win98. I haven't tried it on the dual-CPU NT machines yet, but it would be interesting to see because I've noticed some things run unusually fast on them, like pyaliens. Does Python/SDL benefit from SMP somehow without special thread programming? Incidentally has anyone tried compiling pySDL on a Mac or BeOS? There is a guy at school with CodeWarrior who I could probably get to try it but I have no idea what this would really entail. > this transfer has to be done with an expensive > python > loop, but it will be simple to create a C extension > to > do it, at which point my little pflame should get > above > 24fps I'll be interested in playing with that when I actually take the trouble to figure it out... I've been wondering about using numpy for simple transparency-aware collision detection. I guess this could still work without a fast transfer, though. But I tried drawing simple gradients in a Python loop...I can make a beautiful Wise Installer/Power Point cheesy blue blend in about... 20-30 seconds. > > the other thing i want to do is pixel-doubling. > first > i'll see if using SDL's scaled BLT is fast enough, > i'll > also compare that to doubling the image in numerical > python. > SDL has scaled blitting? By the way I was looking at the alienlib thing from a while back -- the generic entity-classes -- I've been toying with a few different simple object classes and am a little confused as to the best way to divide up responsibilities (for performing movement, storing data etc.) among the various base and derived classes. Any good info on the subject? --P __________________________________________________ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/ |