I want to create a Windows Form-based adventure game where the player clicks a hex on a static map to bring up their next encounter. I have the map already and plan to scan it and convert it to a .bmp file. My problem is that I'm not sure how to tie the map image in with the game code. Unless I'm mistaken, I think I need to use some kind of imagemap control. If that's the case, do I need to plot each hex individually, or is there a way to plot the whole map in bulk? I found this article, but I'm not sure if it's relevant to what I want to do or not. I'm just looking for general information or links to relevant articles. Thanks.
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
I really like Amit's Game Programming Information, and it has a whole section on hexagon grids. Perhaps you'd find any of those links to be informative? Here is the list of links he gives:
I apologize if this isn't helpful. Windows Form isn't the ideal platform to develop a game, but I assume you would have one image per grid square and give it an OnClick event. There would be the issue of overlapping corners though... (the transparent corners of the square image that the grid image is on). In a traditional game you would use the above information to figure out how to translate click coordinates (screen space) to the hexagonal grid coordinates (which your link details nicely), and then handle it appropriately. |
|||||||
|