BBC BASIC for Windows
Programming >> Graphics and Games >> Absolutely pixel-perfect collision detection
http://bb4w.conforums.com/index.cgi?board=graphics&action=display&num=1387532016

Absolutely pixel-perfect collision detection
Post by David Williams on Aug 18th, 2008, 3:40pm

Some new functions have been added to GFXLIB to provide fast, easy-to-use, pixel-perfect collision detection suitable for use in many kinds of 2D game. Interested persons can see a demo of one of the collision detection routines right here:

http://www.bb4w-games.com/collisiondetect.zip

Instructions: Move the hand around using the mouse. If so much as ONE pixel in the hand comes into contact with ANY pixel in any of the three collision objects (cat, crystal and butterfly) then a red screen border appears indicating that a collision has taken place.


Current publicly available version of GFXLIB (poor documentation, sorry):

http://www.bb4w-games.com/gfxlib_v1_0_beta3.zip


Regards,

David.