Sign in to follow this  
nikita

large hex grid

Recommended Posts

hy, i've question: i have to program a program which is to read a large hexagonal map and to perform a*-search. the problem is how to represent the map-data. it is given as a sequence of '*' and '.', where '.' indicates an empty field and '*' a field occupated by a tree. the sequence is a spiral enumeration of a hex map. see http://www.clutter.ch/spirale.gif the problem is the following fact: the maximum sequence length is 40000000. what would be a possible represensation data structure? thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by kuphryn
One solution is bitwise shifting. Store the data as sets of unsigned int, for example, and determine each point in the map via masking the bits.

Kuphryn


thank you, seems to work. i've found enough information

[Edited by - nikita on March 29, 2005 9:30:02 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this