[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] shapes other than rects?



> There's a library called SGE linked from the SDL libraries page.
> It has drawing functionality and some collision detection I'd very
> much like to see in pygame. Per-pixel collision detection between
> "pixel masks". So you could create pixel masks out b&w of images or
>'out of image aplha channels (often a pixel mask would be just that,
> but not necessarily always) and the check for collisions between these.
> 
> I need this functionality in my game and I'm currently contemplating
> whether to implement it in Python (speed?), C, or try my hand at
> swiggin' SGE.

yeah, SGE is a nice kit of many of these tools. although some of
the algorithms are a bit rough. (ie, i think i could write a python
line renderer that is quicker than SGE's)

if you want to get your feet into Numeric Python, i believe
you could write a pixel level collision detection in python
that would be quick enough for general use. (although a C
version would be quicker)

if you just need something like this that is quick and dirty
you can probably get by with some good Numeric python code.
if you need something highly tuned, than a C extension will
be the best bet.


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org