[HN Gopher] Triangle Grids
___________________________________________________________________
Triangle Grids
Author : jsnell
Score : 156 points
Date : 2022-07-10 15:48 UTC (7 hours ago)
(HTM) web link (kvachev.com)
(TXT) w3m dump (kvachev.com)
| lbotos wrote:
| Anyone know the game on the square grid example here:
| https://kvachev.com/blog/posts/images/triangle-1.jpg
|
| I thought it was advanced wars but I don't remember walker mech
| units?
| theandrew168 wrote:
| Appears to be Into the Breach [1].
|
| [1] https://subsetgames.com/itb.html
| the_af wrote:
| It looks like Into the Breach: https://subsetgames.com/itb.html
| janderson3 wrote:
| Into the Breach. It's an excellent tactics game where each
| mission only has about five turns, and every move matters.
| [deleted]
| yellowapple wrote:
| Another advantage of triangle grids: they work great for
| spherical maps, whether that sphere's mesh derives from a
| tetrahedron or octahedron or icosahedron. You'd need some fancier
| logic for movements around the edges of the "sphere's" base mesh,
| but once that's solved you're golden.
| jiaaro wrote:
| I'm working on a triangle-grid board game, probably for playdate
| (wip builds: https://jiaaro.itch.io/3nclosure)
|
| I was surprised to find play testers had a hard time
| internalizing the grid - e.g. making mistakes that result in
| losing the game in the opponents next turn.
|
| Also, I used simple x, y coordinates for each cell with even-
| numbered indexes being the upward-pointing triangles and odds
| being the downward-pointing ones. Similarly odd-indexed rows were
| offset right by half a triangle to make them align properly
|
| [edits]: added details
| cragwind wrote:
| 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.
| 0xMatt wrote:
| Karellen wrote:
| In the section "Directions and Adjacent Tiles", _before_ it
| starts to consider diagonals, it says that triangle grids have 3
| adjacent tiles and 6 directions of movement.
|
| I don't follow this. Aren't 3 of the 6 directions it's
| considering going through the corners of the origin triangle? If
| so, how do those not count as diagonals? What is the definition
| of "diagonal" being used?
| the_af wrote:
| I'm likewise unconvinced by that section of the article (which
| is interesting to read nonetheless!).
|
| The benefit of hexes is that every neighbor is the same. There
| are no "special" kind of adjacencies, like with squares or
| triangles, where you must decide how to consider corners,
| whether to allow diagonals, etc. So hexes are the only ones
| that don't mess up distances nor require separate kinds of
| adjacencies.
|
| Also: if tracing a line from the center point of the origin
| triangle, some of those paths require crossing another adjacent
| triangle (different from the "direction" triangle). This to me
| signals this triangular grid is wonky for wargames/games.
| jameshart wrote:
| From an individual cell, there are three movements available.
| But there are two kinds of cell - north pointing and south
| pointing - and the set of three directions you can move in from
| each is different.
|
| From a north-pointing triangle, you can move south, northwest
| or northeast. From a south-pointing triangle, you can move
| north, southwest or southeast.
|
| So across the grid as a whole, six movement directions exist.
| citelao wrote:
| I thought the video was pretty, but it took me a while to find
| out what game it was from: Colossal Citadels. I think the blog
| poster works on it?
|
| https://store.steampowered.com/app/1854570/Colossal_Citadels...
|
| I wish the blog post just had a link to it :(
| the_af wrote:
| He probably does, since he wrote:
|
| > _In Colossal Citadels I made walls and houses follow the
| triangular grid and I love how these procedurally-generated
| castles turned out [...]_
|
| Note in the sentence I quoted, "Colossal Citadels" is a link to
| http://colossalcitadels.com/ :)
| wodenokoto wrote:
| I like how units in the screenshots have different grid sizes.
| One was a square another a hexagon. The way the mountains can
| form differently shaped peaks also looks great
| philipov wrote:
| My favorite recent game with a triangle grid is Vagrus, a dark
| fantasy caravan management RPG. The number next to each line
| shows how many movement points it costs to travel that path. It
| makes it a little hard to see the visual style of the terrain
| underneath, but it functions well.
|
| https://store.steampowered.com/app/909660/Vagrus__The_Riven_...
| the_af wrote:
| Thanks for pointing this game out: seems interesting, cool
| artwork, Dark Sun vibes, works on Linux --> autobuy.
|
| That said, most reviews mention it's punishingly, almost
| unfairly difficult. I took the plunge anyway, sending my money
| to indie devs that want to try something new, but if I find it
| too difficult I'll probably end up giving up in frustration.
|
| What was your experience with this game?
| philipov wrote:
| It's not an easy game, but less punishing than a game like
| Darkest Dungeon, because it doesn't force you to play on
| Ironman. You can save and reload if you need to.
| the_af wrote:
| Save and reload like in XCOM? I can live with that.
|
| Started playing this, going through the tutorial scenario.
| The world building indeed has strong vibes of Dark Sun and
| the Dying Earth genre.
|
| Again, thanks for the recommendation!
| klyrs wrote:
| I love hyperrogue, if more in concept than practice -- why settle
| for triangle grids when you can make a septagon grid! It's fun to
| get lost on a hyperbolic plane, though the gameplay itself is a
| little lacking. I'm hoping that somebody else will pick up the
| concept and do something even cooler.
| axelerator wrote:
| Very inspiring! I just started out to play around with the wave
| function collapse algorithm [1]. I'm in the middle of porting it
| to a cube based 3d grid. And now I'm wondering what a triangle
| based volume presentation would look like
|
| [1] https://github.com/axelerator/wave-function-collapse-2d
| Someone wrote:
| How do you plan to fill 3D space with 'triangles'?
|
| You can't do that with tetrahedrons. You can use triangular
| prisms, but IMO, that's cheating. You can also split a cube
| into six pyramids with a square base and height 1/2, but I
| don't think that's a natural way to fill space.
|
| Looking at https://mathworld.wolfram.com/Space-
| FillingPolyhedron.html, the Truncated Octahedron probably is
| the nicest alternative to the cube.
| kragen wrote:
| I think this question is sort of another way to phrase, "What
| are the crystal systems [or possibly lattice systems] other
| than primitive cubic?" And the answer is in
| https://en.wikipedia.org/wiki/Crystal_system; there are 6 or
| 31 answers depending on how you look at it. Or maybe the
| question is "What are the 3-honeycombs other than the cubic
| honeycomb?" which is discussed in
| https://en.wikipedia.org/wiki/Honeycomb_%28geometry%29 and to
| which there are an infinite number of answers.
|
| Crystal systems are usually described in terms of point
| lattices, while you're talking about polyhedra, but the
| Voronoi polyhedra of the points in the lattice are the
| polyhedra you're looking for. (This is mentioned at the end
| of the Wolfram(tm)r MathWorld(tm)r article you linked.) One
| of my favorites is the cuboctahedral honeycomb corresponding
| to hexagonal close-packed crystals.
|
| Even within cubic crystals, you could reasonably argue that
| face-centered cubic crystals "fill[] 3-D space with
| 'triangles'".
|
| Honeycombs do not, as I understand it, have to be periodic.
| In particular, any 3-D rep-tile can be used to tile space in
| a manner similar to the Penrose tiling, and usually the
| result is aperiodic. I wrote a 2-D demonstration of this
| process is at http://canonical.org/~kragen/sw/dev3/skitch#!ff
| ffrrrfffffrrr...].
| scotty79 wrote:
| https://mathworld.wolfram.com/RhombicDodecahedron.html
|
| Rhombic dodecahedron looks quite nice.
|
| And you could mix it with cube grid for artificial structures
| in your world.
| jedharris wrote:
| From Wikipedia: The tetragonal disphenoid tetrahedral
| honeycomb is a space-filling tessellation (or honeycomb) in
| Euclidean 3-space made up of identical tetragonal
| disphenoidal cells.
|
| https://en.wikipedia.org/wiki/Tetragonal_disphenoid_honeycom.
| ..
| smegsicle wrote:
| > Truncated Octahedron
|
| looks to me like they fill space pretty nicely as an offset
| of cubes, in the same way as hexgrid is sort of an offset of
| squares
|
| https://en.wikipedia.org/wiki/Bitruncated_cubic_honeycomb
| alehlopeh wrote:
| Chinese checkers is an existing game that uses a triangle grid.
| Surprised the article didn't mention that.
| kragen wrote:
| In the terms of the article, it uses a hex grid.
| zelphirkalt wrote:
| A fact that I learned from some old DOS game many years ago, of
| which I do not remember the name: You can play "6 in a line wins"
| on a grid of triangles.
| swayvil wrote:
| Kisrhombille grid. It's worth a look. It's free scaling, like
| triangles and squares. Has 6 axii. Nice.
|
| https://en.m.wikipedia.org/wiki/Kisrhombille
|
| https://github.com/johnalexandergreene/Geom_Kisrhombille#rea...
|
| http://www.fleen.org/generative-art/i0.png
| loupol wrote:
| Cool article. An excellent resource for grids of all kinds is Red
| Blob Games' site. It's mentioned in the article, but only with a
| link leading to a somewhat empty page and not this very useful
| one : https://www.redblobgames.com/grids/parts/
___________________________________________________________________
(page generated 2022-07-10 23:00 UTC)