Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I quite like triangle grids, but they definitely have more complications than squares or hexagons.

For a few years I've been working on a tri-grid RTS with buildable units: https://cragwind.com/blog/posts/triangle-text-grids/

I originally tried hexagons, but I ultimately chose triangles because they can compose into hexes and there were already so many hex-based games. First I tried a design using separate grids floating in continuous space but later switched to a complete grid-based world as it could make for a novel turn-based classic roguelike or strategy game. It's more limited than continuous space, although with tri- or hex-grids you get six rotations versus four with squares.

One difficulty with tri-grids is the poor spatial locality of triangles versus squares or hexes. For example, when calculating influence maps for AI on a triangle grid, each cell score is effectively stretched to the triangle vertices rather than representing a more consolidated or circular region (so for this purpose hexes would be ideal).

Like other grids, transforms (translation/rotation) on a tri-grid can be done with all integer math (and generally, if the game world is grid-based, everything but graphics/animations can be integer math). Rotations about a cell center are trickier (and are limited to three distinct rotations) but can be done by scaling up coordinates and then back down. I'll write up more details if anyone is interested.



Hello, what you could say about rotation is interesting me. I'm writing a 2D board game with a tri-grid for fun. For the moment I have only done the grid, the change of scale.


This project looks really good.




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

Search: