zircher wrote:An offset vertical square grid is easy. You just have to know when you're in an even column and apply a half square offset to the Y axis. You then divide the X and Y coordinates by the square size to get your array coordinates. I was doing that back in the 80's in Turbo C.
I started with offset squares originally. In more recent versions, I rendered hexes using transparent PNGs. The corners of the images overlap. It looked like a real-deal hex layout, and the layers made it really neat.
Here's an example:
HexMapPrototype by harborpirate, on Flickr
As I recall, I got clicking the central portions of the hexes to work. The key issue: Having areas of the hex that were not triggered when clicked caused problems, because it allowed hexes from layers below it to potentially be triggered instead. (The mouse pointer coordinate would "fall through" the empty space I wasn't detecting and hit the "active" portion of a hex in a layer below.)