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

Re: [pygame] sprite collisions - looking for simple snippet



Pygame.sprite has methods for detection collisions: pygame.sprite.spritecollide(), pygame.sprite.collide_rect(), etc.

You can find their reference at http://www.pygame.org/docs/ref/sprite.html.

On Sun, Jul 12, 2009 at 17:41, <nitrofurano@xxxxxxxxx> wrote:
hi!
i'm having difficulty on coding a small nippet of sprite collisions on pygame

on sdlbasic, it's extremelly simple to get working (please don't worry about PEP8... :/ )
http://img19.imageshack.us/img19/6966/bht0.png
http://img19.imageshack.us/img19/8138/bht1.png
http://pastebin.com/f289d80eb

i imagine it can be possible coding similar stuff on python pygame, using as few lines of code as this one, and providing similar results
all feedback is very apreciated, thanks! :)