View Single Post
  #37  
Old December 3rd, 2006, 10:38 PM

Baron Munchausen Baron Munchausen is offline
General
 
Join Date: Aug 2000
Location: Ohio, USA
Posts: 4,323
Thanks: 0
Thanked 0 Times in 0 Posts
Baron Munchausen is on a distinguished road
Default Re: SEV: Taking me to the edge of sanity

Quote:
Imperator Fyron said:
Slick said:
Except that your incorrect opinion does not reflect reality. Hex grids do require more math overall when compared to square grids.


More math overall? How so? You can find adjacent hexes exactly equivalently to square grids; the constant offset x,y coordinate values are different, but it is the same amount of math (add an x value, add a y value). You can efficiently represent and parse both hexes and squares in 2d arrays, with not much difference in computational complexity. We discussed this on IRC yesterday; some important bits:

<Vornicus> a hex system is just a square system with two specific paths disabled
...
<Vornicus> If you're looking at the linked object model, a hex only has six links where a grid has eight (and an ortho grid has four); if you're looking at the array index object model, then grid rejects (0,0) as nonadjacent, hex rejects x == y as nonadjacent, and orthogrid rejects (x + y) & 1 == 0 as nonadjacent
<Vornicus> it was a bit technical
<Vornicus> But the point is that a 2-d array can describe a hex grid as well as it describes a square grid.
<Vornicus> Anyway, without obstructions, a path is found almost trivially

If hex grids provided more efficient pathing, then why aren't all 2D computer games coded for a hex grid?

Because they are weird-looking, and most games are designed for the masses?
I think that what MM is doing is a very fine-resolution absolute coordinate system (x,y) underneath the display, and then figuring out what hex the ship(s) fall into after doing the coordinate calculation. In the early betas there was a lot of 'stuttering' as ships tried to decide what hex they were gonna land in.
Reply With Quote