01-21-2023, 05:26 PM
(01-21-2023, 04:59 PM)SMcNeill Wrote:(01-21-2023, 04:38 PM)bplus Wrote: Can we do this for multicolor images colliding with multicolor images?
Maybe an outline of one shape outline collides with the outline of the other object shape.
Did 2 Asteroids ever collide with each other in that game?
That's usually how I mask all my collisions, when I'm using color collisions like these. If you notice, I'm actually working and detecting color collision on a backdrop screen, rather than the visible display. So, let's say I had a red, white, and blue starship, and a green, yellow, and purple enemy ship. Those would be the images that display on the user's screen, but for my backdrop, I'd have a simple set of faded alpha blue (hero) pixels and faded alpha red (enemy) pixels, which I could then quickly check for blending in the backdrop using mem comparisons. If necessary, I could assign a palette of various colors for different things (faded green for health, faded yellow for power-ups, ect), but all I'd have to do is check for those blended values (blue for hero + green for health = collision with a health object), to know how to interpret them.
very interesting the faded Color Collision! The alpha channel gives many gift to the BASIC coders!