[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Working with maps



One simple idea would be to color each region a different color, and when a click is captured, check what color is at that position. This is limited however, as each region would have to have a unique color.


On Tue, May 18, 2010 at 01:09, Kenny Meyer <knny.myer@xxxxxxxxx> wrote:
Hey,

I'd like to work with irregular formed geometric shapes like those in of
country maps in pygame.

I want to do the following:
"Divide" a country map into its states and provinces and make each of them
"click-able", where the map could be an image (*.png) or maybe a vector graphic
(*.svg).

The result should be:
A game where to guess and click the name of the state and province on a map.

Observations:
It would be quite difficult to assign each state/province fixed coordinates as
those are irregular geometric shapes.

Any ideas, pointers to other projects or suggestions?

--
 Regards,
 Kenny Meyer