I'm trying to make a puzzle game, and I'd like it to be as real as possible. The pieces of the puzzle are covering each other randomly, and the user can freely select any piece, not only the topmost. A sole condition - as in the real life - he must see the piece.
Now how can I find out which piece was selected (where was the mouse when the mouse pointer when the mouse button was pressed)?
Please note that the pieces are not rectangular, but as in a real puzzle.
Maybe only a few pixels can be seen from a given piece, as the other are covering it...
I have to determine somehow, whether the mouse is over the visible part of the mask (and not the rectangular sprite irtself!) for the given piece (sprite).
Is there any DirectX API for that? Any ideas? Any help would be welcome! (I'll mention your name in the source and "Greetingz" section )
Thanks in advance!