.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old June 4th, 2001, 03:25 AM
LazarusLong42's Avatar

LazarusLong42 LazarusLong42 is offline
Corporal
 
Join Date: Nov 2000
Location: Ann Arbor, MI, USA
Posts: 191
Thanks: 0
Thanked 0 Times in 0 Posts
LazarusLong42 is on a distinguished road
Default Re: Fix to movement problem

quote:
Originally posted by Cyrus:
The only reason why I've never wanted to write one is that you can't use a simple data structure, like a two dimensional array, to hold a game board.


Actually, a hex board would could easily be stored in a 2-d array. One axis of the board is your first array subscript; another axis 60 degrees away is the second subscript. Any member of a regular 2-d tesselation can be described by only two coordinates; the coordinate axes, however, won't necessarily be orthogonal to one another.

The only problem then becomes that along one diagonal [i,j] --> [i+1, j+1], the distance is 1, while along the other [i,j] --> [i+1, j-1], the distance between hexes is two.

LL <-- shoulda majored in math.

__________________
in Virtuo Design
Read my latest story at Speculon
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 04:08 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.