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

Re: [pygame] Training Pong MVC



Hi

If you want to take a look to the sprite engine, there you will find a early version:

http://www.mypage.bluewin.ch/DR0ID/index.html

It is not commentet very well and has changed since that. Perhaps I going to release the new version in a few days (if I have time).

~DR0ID

I'll keep this one short :)

I'm just subclassing Sprite. My sprites are drawn from 24bpp pngs which I
have stored in a resource file.

Other than that, I just have a couple of functions within the sprite class
(update, and a few other custom ones).

The reason I got them to move around with almost no slowdown is because I
passed in the RLEACCEL flag on the surface. Don't know what RLEACCEL *is*,
but Pete suggested it, and it worked :)

I'll look into getting onto IRC in the near future


~Chris

One more question: do you use pygame.sprite for drawing your sprites in your game with so many sprites? because I'm writing a (faster) sprite engine (only redrawing dirty sprites) you can use with minimal changes to existing code using pygame.sprite . You can find me in IRC #pygame on freenode.net for more information.




CONFIDENTIAL NOTICE: This email including any attachments, contains confidential information belonging to the sender. It may also be privileged or otherwise protected by work product immunity or other legal rules. This information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this emailed information is strictly prohibited. If you have received this email in error, please immediately notify us by reply email of the error and then delete this email immediately.