|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| Coordinates in Hexagon-Based Tile Maps |
|
![]() Anonymous Poster |
||||
|
||||
| Âîáùåì àõóåííåéøàÿ ñòàòüÿ. |
||||
|
||||
![]() njpaul Member since: 8/30/2004 From: Mukwonago, WI, United States |
||||
|
|
||||
There is an error in this article. The B-section right top should not subtract one from the x coordinate.//pseudo Code!!! // right side if SectPxlX >= HexagonR then begin if sectPxlY < (2 * HexagonH - SectPxlX * m) then begin ArrayY := SectY - 1; // ArrayX := SectX - 1; <-- Remove this line end else begin ArrayY := SectY; ArrayX := SectX; end; end; // left side ... |
||||
|
||||
![]() Phillip Hamlyn Member since: 9/2/2004 From: Peterborough, United Kingdom |
||||
|
|
||||
| Is it me or is the calculation for the values r and h the wrong way round. Consider a hex of side 100, h would evaluate to 15.x and r 98.x. r is clearly the longer distance - is it a simple typo or have I been looking at it too long ? |
||||
|
||||
![]() tulio Member since: 5/20/2004 From: Brazil |
||||
|
|
||||
In the pseud-code: PixelX := ArrayX * 2 * TileR + (FieldX AND 1) * TileR What fieldX means? Shouldn't it be ArrayX? :S []s Túlio Caraciolo |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|