# the_hoff1

Member

5

100 Neutral

• Rank
Newbie
1. ## 2D Map with Provinces

Wow, that would be very efficient. So I just take a sprite, store it in an array on a per-pixel basis then?
2. ## 2D Map with Provinces

Hmm interesting, but im confused, what does the width represent? How would that return the pixel number? I understand line 2, but perhaps I don't understand the formula to get the pixel number. Thanks!!
3. ## 2D Map with Provinces

Im not sure I like the idea of story every single pixel in an array. Wouldn't that be extremely inefficient trying to search through it? Could you explain more about your idea of polygonal form? Edit: http://en.wikipedia....oint_in_polygon Where you referring to something like this? Edit 2: http://stackoverflow.com/questions/924171/geo-fencing-point-inside-outside-polygon I believed I solved my problem with this link. Thanks for the tips guys, I just needed a nudge in the right direction. Thanks!!!
4. ## 2D Map with Provinces

Ok, Im not sure how to check which province I am selecting since they would all be different shapes, not square. I thought I had remembered reading that if I wanted to do this I would have to do picking on the province sprite to know which province I selected then do some type of comparison etc.. Is there a way(algorithm?) to check which province I selected regardless of its shape?
5. ## 2D Map with Provinces

Hi, I wanted to use a 2D map of a random country with provinces. Each province would represent an area you could click, construct buildings there etc... The part that alludes me is how would I go about determining which province I clicked? If I did know which (province/sprite/texture??) how would I then still determine who that belonged to since all I determined was which graphic was selected? Would I then do some type of search comparing or something?? Graphics type programming isn't my specially. I don't want any code, just general idea's to point me in the right direction. I haven't done something like this before so any tips is appreciated! Thanks,