Implementing a Risk-style board

Posted by pouzzler on Game Development See other posts from Game Development or by pouzzler
Published on 2012-04-14T18:46:55Z Indexed on 2012/04/14 23:49 UTC
Read the original article Hit count: 120

Filed under:

I have two images of the same dimensions. One is represents the game board in a user-appealing way, the other represents it in a computer-friendly way where each game area is painted in a unique, uniform color. When the user clicks the board, we get the click coordinates, find the color of the pixel at the same coordinates in our second image, and that color is directly translatable to a game area, since each area is painted in its own color.

Is that a good implementation? Can you suggest better, if it isn't?

Best regards.

© Game Development or respective owner

Related posts about maps