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

Re: [pygame] [Announce] Python bindings for the bitmask collision detection library



Hi again.

This is the time we are in irc weekly for dev stuff.  Otherwise I idle
in the channel, but don't really look in that often.

Ok, I will try to catch that time next week. In the meantime is there anything I should do? One question is how tightly you want to integrate the mask stuff into pygame. I imagine that pygame.sprite.spritecollide should somehow be made to work with the masks, but it could also be a stand alone module, "pygame.mask" or something.

One way to do it is to completely hide the mask, and just implement an
surface.overlap(anothersurface, offset). This would automatically
create masks when needed for each surface, based on the alpha channel
or colorkey of the surface. The problem with this is that sometimes
you like to have masks which are not really related to an image, for
example an "area of effect", but on the other hand it would be very
easy to use for the majority of cases.

Another way to do it is to just add the current bitmask module to
pygame, then the programmer has to create the masks himself, but
things are more flexible and the implementation is easier.

Which approach do you prefer?

Regards,
Ulf