This is a collision detection module that I created long time ago. The idea come from a question post by someone at stackoverflow.com answer by @Blindman67 about the idea of having fast but almost pixel perfect collision using Polar coordinate.
https://stackoverflow.com/questions...detection-of-two-partially-transparent-images
The concept:
Fast almost pixel perfect collision can be achieved by defining the shape of each sprite with a set of polar coordinated. Each coordinate describes the distance from the center (the center is arbitrary but must be inside the sprite) and direction from the center of the furthest most pixel from the center along that direction. The number of coordinates is determined by the circumference of the outermost pixel.
Base on the answer by @Blindman67 ,I code this CX module here: https://github.com/zomagic/cerberus_magic/tree/master/polarcollision/modules_ext/magic
Feel free to optimize it
https://stackoverflow.com/questions...detection-of-two-partially-transparent-images
The concept:
Fast almost pixel perfect collision can be achieved by defining the shape of each sprite with a set of polar coordinated. Each coordinate describes the distance from the center (the center is arbitrary but must be inside the sprite) and direction from the center of the furthest most pixel from the center along that direction. The number of coordinates is determined by the circumference of the outermost pixel.
Base on the answer by @Blindman67 ,I code this CX module here: https://github.com/zomagic/cerberus_magic/tree/master/polarcollision/modules_ext/magic
Feel free to optimize it
Last edited: