Thanks for the inspiration @Baxslah and @Scraggle
I've solved the perfect pixel collision detection and although I'm debugging a couple of items, it's working like a charm. Pity TGC couldn't add this functionality natively or give us access to Image Data from Atlases when copying Memblocks.
to solve it, I load the main atlas image into a memblock, and then when I add a sprite, I create a new MemBlock with that image data and add it to a linked list. I check the linked list to determine if I've added that sprite already. So worst case scenario in MM are 8 actors and our hero (9 memblocks), the remaining image data is not treated as an actor (more to come
)
I can get away with the first version of this checking type because the sprite blocks don't exceed 32 x 32 pixels each, with some jiggery pokery, I can scan only the overlapping (intersection) of pixels to test, which improves performance, and as I'm using PNG's I only need to check the Alpha Byte to determine if there is a pixel available!
The first version is crude, however taking into account a 32 x 32 pixels sprite, i can further rationalise the algorithm to reduce the image data to a Bit mask of 32 bits, which rests nicely in an AppGameKit int (also 32 bits). So with a clever piece of bit rotation and masking (XOR and AND) I reduce the pixel collision detection test at worst case checking 32 INTS of data.
It's been an interesting challenge, but I think the results will be worth it.
Once I've completed some bug checking (probably over the weekend now), I'm hoping to get a playable (redacted version) early next week (assuming no other major issues). To play test and get feed back.
Thanks Everyone
[href]https://www.facebook.com/WonkyPix
http://www.wonkypix.com
http://www.appstore.com/jsecconsultancyltd[/href]