Collision help?

BlitzMax Forums/BlitzMax Programming/Collision help?

neos300(Posted 2009) [#1]
Hello, I am have absouletely no idea how to do collisions in bmax. The collisions need to be pixel-perfect, but they also need to diffrentiate between collidble(enemys and floors) to non-collible(backrounds). Does anyone know how to do this?


xlsior(Posted 2009) [#2]
there's two relevant commands:

CollideImage and CollideRect.

There's some samplecode on how to use them in the Blitzmax help.


_JIM(Posted 2009) [#3]
Also, if you care about speed, use CollideRect first, and if that returns true, use CollideImage. There's lots of additional ways of culling the collision checks, but this is the first one you should use.