Skip to main content

PixelPerfect - 1.0

A simple pure python implementation of an pixel perfect collision detection algorithm.


John Eriksson
(wmjoers)
A simple pure python implementation of an pixel perfect collision detection algorithm.

When starting the example 200 sprites is added to the screen at random locations. You can then move a larger blue sprite around by using the arrow keys or by using the mouse. Press spacebar to toggle between the pixelperfect-algorithm and the regular rectangle based one.

Whenever a hit is detect it is indicated by the BOOOM! text.

There is a bug in the current PyGame release that prevents this example from working. But if you check out the latest PyGame version from CVS it should work just fine!

Changes

Links

Home Page
http://arainyday.se
Source
http://arainyday.se/projects/python/PixelPerfect/PixelPerfect.tar.gz

Releases

PixelPerfect 1.0 — 2 Mar, 2006

Pygame.org account Comments

  • vasif 2013-12-02 20:51

    Is numpy really needed to run this code ??

  • bananaguy 2014-10-29 12:47

    the link to the program doesn't work