How to highlight non-rectangular hotspots?

Posted by HuseyinUslu on Game Development See other posts from Game Development or by HuseyinUslu
Published on 2012-03-26T07:31:31Z Indexed on 2012/03/26 17:40 UTC
Read the original article Hit count: 302

Filed under:
|

So my question is highly related to Creating non-rectangular hotspots and detecting clicks.

Yet again, I've irregular hot-spots (think the game Risk). So basically, we can detect clicks on these hot-spots easily using color key mapping as discussed in above question which I don't have any problems implementing (which is also covered here in details).

The problem is about highlighting these irreguar hotspots. So let me explain the question a bit more - the above color key mapping guide uses this as a world map:

world map

Then the author color-maps the imaginary countries:

color coded world map

Now we can now detect the country the pointer is over. In the same article author mentions outlining countries on mouse-over. Though to get the effect, he creates unique border assets for each country - like:

line drawing outlining a single country

For the game I'm working on I'm using the same color-key mapping idea to detect hot-spots, but I didn't like the way of highlighting hot-spots. Coloring all the hot-spots is already a time-consuming job for me - as I have 25+ hot-spots for each map. Further, the need to have 25 unique border/highlight asset per hot-spot doesn't sound right.

Anyone have a better idea/suggestion on highlighting these hot-spots?

© Game Development or respective owner

Related posts about algorithm

Related posts about gui