Collision Mask Module - Pixel Perfect CollisionsMonkey Programming Forums/User Modules/Collision Mask Module - Pixel Perfect Collisions
| The Collision Mask Module is a module to perform pixel perfect collision detection.|
All the code is open source. The Collision Mask Utilities programs are licenced under the MIT licence and the Monkey-X module is public domain.
The Collision Mask Module consists of:
* Two applications written in Qt (C++) that run on Windows/Linux/MacOS and allow you to create and view â€œcollision masksâ€ from the alpha data in PNG images.
* A Monkey-X module (a single file) that contains the scaling, rotation and collision detection code.
* Four example applications.
* An API reference and the custom mask file format specification.
The Monkey-X module is written in 100% standard Monkey-X code and does not require any changes to Mojo. In fact, apart from the Debug display feature, it doesn't even require Mojo. It works on all Monkey-X targets.
* Synchronous and Asynchronous loading of mask files.
* Rotation and scaling of masks.
* Pre-allocation of empty masks for use as targets for rotation and scaling, avoiding allocation of memory in the main game loop.
* Mask to mask collision detection.
* Point to mask collision detection.
* Rectangle to mask collision detection.
* Circle to mask collision detection.
* On-screen display of masks for debugging purposes.
You can find the downloads on my website:
| Looks nice |
| This is brilliant! Works really well even on HTML5 in all the demos... many thanks for making this available! |