I am currently in the process of writing a "mouse maze", where the player guides their mouse pointer through a course without touching any of the edges. My main issue seems to be with the wall collision, and I have been wondering on how to go about doing it most efficiently.
I have heard whispers here and there of "collision mapping", and this popped into my head:
Is there a way to load a (predrawn) maze map as a background, and then have processing detect the colors (black walls) of the map and use that to define the borders of the maze? Rather than using tons of "if" statements declaring where the mouse can and can't be, it would seem less tedious to detect the pixel colors, and base collision off the map.
Provided that this is not a reasonable option, are there any "shortcuts" to use in collision detection?