Hex math is weird. Since there are 6 directions instead of 4, there's no simple mapping between hex positions and 2D x,y coordinates. There is, a hexagonal grid is isomorphic to a [skewed] rectangular grid, i.e. it can also be indexed with a coordinate pair (u, v). The neighbours are at offsets (+1, 0), (-1, 0), (0, +1), and (0, -1) - just as in a rectangular grid - and the two additional neighbours are at (+1, -1) a…
Building a Procedural Hex Map with Wave Function Collapse
81–90 of 92 posts
Re: Building a Procedural Hex Map with Wave Function Collapse
#82This is not Wave Function Collapse. This is a constraint solver. The goal of the original algorithm ( https://github.com/mxgmn/WaveFunctionCollapse ) is to infer the constraints from a sample, and then run a constraint solver. Hard-coding the constraints skips the whole point of the algorithm (which is also badly named by the way).
Re: Building a Procedural Hex Map with Wave Function Collapse
#83It's beautiful. But also pretty unsatisfying in a way. Roads don't make sense. Rivers barely make sense. There's no higher-scale structure - the reason why most games with incremental procedural generation usually feel stale after a while, and always static. Every planet is different, yet feels the same. (Dwarf Fortress is the one procedural game I know - besides maybe its more faithful clones - which isn't static. B…
Re: Building a Procedural Hex Map with Wave Function Collapse
#84It's beautiful. But also pretty unsatisfying in a way. Roads don't make sense. Rivers barely make sense. There's no higher-scale structure - the reason why most games with incremental procedural generation usually feel stale after a while, and always static. Every planet is different, yet feels the same. (Dwarf Fortress is the one procedural game I know - besides maybe its more faithful clones - which isn't static. B…
Re: Building a Procedural Hex Map with Wave Function Collapse
#85For guiding the search, you might want to consider search steps that select only one feature, for example that a pair of adjacent tiles should be connected by a road, and just propagate that information. That could be used as a way to guide the search on high-level features first, and then later realize the plans by doing the normal search.
Re: Building a Procedural Hex Map with Wave Function Collapse
#86Hex math is weird. Since there are 6 directions instead of 4, there's no simple mapping between hex positions and 2D x,y coordinates. There is, a hexagonal grid is isomorphic to a [skewed] rectangular grid, i.e. it can also be indexed with a coordinate pair (u, v). The neighbours are at offsets (+1, 0), (-1, 0), (0, +1), and (0, -1) - just as in a rectangular grid - and the two additional neighbours are at (+1, -1) a…
Amit has a pretty good overview of the (many) ways to map coordinates to hexes: https://www.redblobgames.com/grids/hexagons/
Re: Building a Procedural Hex Map with Wave Function Collapse
#87Re: Building a Procedural Hex Map with Wave Function Collapse
#88Love this. As an aside, if the author reads this, did you consider using bitfields for the superposition state (ie, what options are available for a tile)? I did a wfc implementation a while back and moved to bitfields after a while.. the speedup was incredible. It became faster to just recompute a chunk from scratch than backtrack because the inner loop was nearly completely branchless. I think my chunks were 100 ti…
> I did a wfc implementation a while back and moved to bitfields after a while.. the speedup was incredible. Yeah, my WFC bot (which happens to generate Carcassonne maps in an amusing coincidence) eventually ended up using https://github.com/bits-and-blooms/bitset which improved things hugely. > It became faster to just recompute a chunk from scratch Kinda what mine does - every now and again[0] it stacks the current…
Re: Building a Procedural Hex Map with Wave Function Collapse
#89[flagged]
This sentiment is quickly becoming the most annoying low-effort comment on HN. If you don't want to read it, don't read it. If something about the writing offends you, then describe it, so we can talk about it.
Re: Building a Procedural Hex Map with Wave Function Collapse
#90Earlier quoted context omitted.
This sentiment is quickly becoming the most annoying low-effort comment on HN. If you don't want to read it, don't read it. If something about the writing offends you, then describe it, so we can talk about it.
I’m pretty sure AI-written comments hold that crown. I have described what bothers me about the writing, and also a proposed solution. Post the prompt, not the slop.
No you haven't, you've made an unprovable claim about how the writing was accomplished without pointing out a single feature of the writing itself.
Too long? OK, but homebrew gamedev articles often are. Skimming was a good skill before AI and still is.
Bad writing? Again -- hobbyist posts don't exactly win awards. I suspected possibly some AI myself but not to the extent you're baselessly asserting: I really doubt there was a single prompt in any case. The article is structured like any other.
If it were content-free clickbait or something, the complaint would hold water. As it is this is a reasonably interesting article that has generated a large and fun discussion on HN, so even if you _could_ prove AI use, so what?