Trying to make a 3d hologram representation of a world map that the player can control remotely and i am having issues figuring out how to store hex maps, any help would be amazing!
Hey Oculus350,
The best way to do this is to use a 2D Array
of an Enumerator
which specifies what the tile is.
First, you should make a Enumerator
with all the types of tiles there can be, then make a Structure
, which has an array of these Enumerators
, then somewhere else, make another array which holds an array of these Structures
.
To write to this 2D Array
, you can use a For Loop
to iterate through every tile, and find the correct X and Y coordinates to map to the array inside the Structure
, and the array of Structures
.
Then to read and create the appropriate, you can just do the reverse of the above step.
Hopefully that can give you some ideas.