Show HN: Pipes puzzle (a.k.a. Net) on a hexagonal grid (opens in a new tab)hexapipes.vercel.app
537 pointsI'm rather fond of the pipes puzzle where your goal is to restore a scrambled network of connections by rotating tiles. It's usually played on a grid of squares and this all started when I decided to make a programmatic solver for that kind of puzzle. Then I realized that with some minor changes the solver could generate new puzzle instances. I thought about what kind of puzzle to make and someone suggested a hexagonal grid. Adapting the generator wasn't too hard but then I had to create a way to play this variant. So I did just that =).
I find hexagonal pipes a bit more difficult than the square variant because there's a larger variety of possible tile shapes. For an extra challenge I implemented wrap mode where the board can connect to itself (right to left and top to bottom), so there are no convenient outer walls to start from.
The site is made with Svelte Kit, its code is available on github at <https://github.com/gereleth/hexapipes>.
Hope you enjoy playing =).

Comments (161) 65 threads
Earlier commentsMy frustration with wasting time (23 hours; I slept on it) on an unsolvable puzzle is somewhat mitigated by the fact the problem taught me this: if you count the free ends and come up with an odd number, you can know immediately that the puzzle isn't solvable, without rotating any tiles. An even number doesn't prove the puzzle is solvable, but an odd number definitely indicates a problem.
Edit: Nevermind; there was a 4th loose end I was overlooking. Finding it led to getting unstuck & the puzzle was solvable after all.
Unfortunately due to the way the site works, I don't seem to be able to get a new 10x10 puzzle by refreshing the page? So I'm stuck on the unsolvable one. I can imagine saving the progress is a feature, but you should also add a "pass" or "skip" button. Oh - I just realized I can "hack" it by manually changing the number in the URL to something else, e.g. /10/851.
Before I realized the puzzle was unsolvable I was also looking for a button to randomize/reset the initial tile positions. I was thinking maybe I wasn't seeing the solution due to my preconceived ideas from already-placed tiles. That wouldn't have helped here, but maybe on a solvable one being able to re-randomize would help a player get unstuck.
With a randomize button do you mean a complete reset to initial state? Or something like keep the locked tiles, reset the rest?
Didn't get a chance to look at your source.
My svg handling was very much "learn as I go". An earlier version even had circles instead of hexagons because they're simpler to do. There's a cool playthrough video of that version: https://www.youtube.com/watch?v=vlpPr485NUY
All comments shown.
Couldn't load more comments. Check your connection and try again.