Hacker News new | comments | show | ask | jobs | submit login
Half Tile Offset Streaming World Grids (demofox.org)
28 points by Atrix256 6 months ago | hide | past | web | favorite | 7 comments



When you consider coordinates, Half Tile Offset is same as using hexagonal tiles, but there are mathematically (and code-wise) nicer alternatives: http://www.redblobgames.com/grids/hexagons/#coordinates

If you want to preload 6 adjecent tiles as suggested instead of 8, it seems better to make them hexagon-shaped as well (to make the distance to edges more uniform in all directions). I haven't implemented hexagonal tiles of vector data though - any experiences?

On the other hand, if the tile size is relatively small and you preload multiple tiles in all directions anyway, the proportional advantage of using Half Tile Offset or hexagonal tiles diminishes and code complexity prevails. (The scaling table in the end of the original article fails to distinguish that you don't have to preload all (2N+1)^2 square tiles either: you can approximate a circle with small squares and preload just about PI/4*(2N+1)^2 tiles ie. 21.5% savings.)


> If you want to preload 6 adjecent tiles as suggested instead of 8, it seems better to make them hexagon-shaped as well (to make the distance to edges more uniform in all directions).

But then you incur the artistic complexity of hexagonal tiles....


Half Tile Offset has its artistic complexity likewise: instead of each edge being shared by two tiles, some sharing will be on the half-edge level etc.


I think you both missed that; it's about the arrangement of world chunks, not about the arrangement of tiles within those world chunks.


I guess it depends on the game whether the arrangement of world chunks and/or tiles has artistic implications.


I'm not using the theory for anything, but that's an awesome link, cheers.


I didn't know it was called "Half-Tile", but Treyarch's Spiderman 2 used this approach (I think it was called "bricks" internally) to stream the game.

So when Spidey was speeding up to some direction, I think it was three bricks that would start asynchronously loading, and others would get cancelled (say CancelIoEx on Windows/etc.)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: