Wednesday, May 09, 2007

Pygame weekly mini sprint 2007/05/09

In this weeks pygame mini sprint a few things got done.


Marcus has been working on the scrap module some more this week. He got image pasting working with the gimp. As well as got images working on windows. In the process of trying to get it working on MacOSX a mac got broken! oh noes!! Hopefully Bob can step up and do his MacOSX magic once more.


I worked on getting the bitmask library from Ulf Ekstrom integrated into pygame.

Pixel perfect collision detection is what it is good for. Since it is in C it runs very quickly too. The demo looks really cool, with things bouncing off each other.

It's in subversion now, but there's still a few things I need to do.

- make constructor which takes a surface.
- a 'make_from_surface' method in C. should take a threshold for alpha.
- complete the documentation (now in src/mask.doc)
- complete the unittests (test/test/mask_test.py)
- make set_at and get_at raise IndexError when wrong index is given.
- double check the reference counting.
- integrate Mask into examples/testsprite.py


You can try it out by doing running:
    cd examples
    python mask.py data/alien1.gif


JKrukoff made a proposal in IRC about how to modify the current sprite class, so that it is extendible for different types of collision detection. So for example sphere based, AABB, or Rect, bitmask collision detection could be used. Or your own custom collision detection function. He's going to make a proposal, and implementation to the pygame mailing list - so people there can comment on it.




Melbourne Web Developer Written by a Melbourne web developer. Available for your projects - php, mysql, e commerce, javascript, CMS, css, flash, actionscript, python, games, postgresql, xml.

No comments: