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

Re: [pygame] pixel perfect collisions



Hi, (sorry about the screwed up threading)
I didn't know about SGE when I wrote my routines, but just 
by looking at the code for CGE I dare to guess that mine is 
just as fast or faster. For instance SGE seem to compare masks
byte for byte, while you can do it dword for dword. I haven't 
compared actual performance though. Both codes are probably fast
enough for any game written in python. I'll try to hack the testsprite
program from SDL to do collision detection and we can see how large
impact it has on performance.

Are you interested in pythonizing the fastest of the two routines?
One difference is that SGE is written in C++ and my attempt is 
written in C, I dunno which one is the best for this purpose.

Regards,
Ulf Ekström

Danny van Bruggen wrote:
> Hmmm, I'd like to see a comparison with the collision functions in
>SGE!
>
>That URL was http://www.ifm.liu.se/~ulfek/bitmask/Bitmask.html before
>URL encoding mangled it, ofcourse.
> 
[snip]
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org