Gerald said:
I'm giving this some thought.
To get everything you want might be quite complicated. Especially when just
learning.
However, that is half the fun, and what better way to learn, right?
I may be over complicating this, but I think you might want to create a user
control that will render everything. To accomodate the zooming and location
functions, your best bet would be to treat these cells as vector objects.
Meaning real Hexagons, instead of simple brush tiles.
This does sound more complicated - but I'm a firm believer that if you
dive in at the deep end you'll always end up with what you want - minus
a few handfuls of hair
So, I take it using vector objects is quite a bit more complicated than
Terry Burns solution?...
One thing that will require special consideration is how you want to define
rows.
Since of course a Hex Grid zig-zags instead of being a classic grid.
Take a look at the attached 2 pictures.
In HexMap1, you have a defined set of rows. However, this is going to be a
mild pain to deal with the offsets. This is probably how the game works.
In HexMap 2, you have a mathematically easier approach, however your row
definition gets a little weird. If you are on an Odd Column, then your Rows
would be Odd. If on Even Column, then your Rows would be Even.
How does your game deal with this?
The game has the following description in it's rules - The game's called
"Atlantis":
----
Since Atlantis is made up of hexagonal regions, the coordinate system is
not always exactly intuitive. Here is the layout of Atlantis regions:
____ ____
/ \ / \
/(0,0) \____/(2,0) \____/
\ / \ / \ N
\____/(1,1) \____/(3,1) \_ |
/ \ / \ / |
/(0,2) \____/(2,2) \____/ |
\ / \ / \ W-O-E
\____/(1,3) \____/(3,3) \_ |
/ \ / \ / S
/(0,4) \____/(2,4) \____/
\ / \ / \
\____/ \____/
/ \ / \
Note that the are "holes" in the coordinate system; there is no region
(1,2), for instance. This is due to the hexagonal system of regions.
---
So it would seem that any hexes with an even column will only have even
rows and likewise any odd column hexes only have odd numbered rows. It
helps knowing that a map will never use negative numbers so a simple
mathematical equation should be able to work out how to place the hexes.
I can also provide an example on how the report processes it's region
information. As it stands, my basic program at the moment is able to
process the reports and categorize them into relevant groups. I'm
thinking of using ADO to store the turn information, this will allow me
to use SQL to filter out specific region information for each hex.
Niels