Lurker News
Hello, HN - I wanted to share this puzzle game I made during my vacation.

I'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 comments
jojohack1 reply#
Nice job! This reminds me a bit of a space puzzle game I made a while back ( the premise of which is to rotate the hexagon tiles to create a pathway from the player character to the orb in each level )

https://www.gorch.com/games/spacehex/

gereleth#
Fun puzzle! I played a few levels and I can see some similarities. Did you handcraft the levels? They don't look algorithmically generated.
ALittleLight1 reply#
I struggled with the first 5x5 taking about 8 minutes, then 2.5 minutes, then less than one minute. I'm still not even sure what principle I'm using to solve these but it is enjoyable. It's mainly just rotating until I hit the right color and looking for the next 3+ joint to rotate.
yarg1 reply#
It's a bit like sudoku; start with the elements for which there's only one choice, and rotate into place.

Often this will lead to more tiles with only one viable configuration.
(At very least you'll reduce the search space.)

culi1 reply#
I used to play this exact game on a mobile app. One great feature was the ability to click and hold to "lock" certain pieces into place. Like you pointed out, there's certain pieces (on the edges) that only have one possible configuration

My 5x5 is record is 28s on my 5th game. The strategy is actually really simple once you get going: run through and identify all the "lockable" (only one possible configuration) tiles and then run through the consequences of those configuration and keep repeating

ALittleLight#
You can lock with a right click.
greasyphalanges1 reply#
Do all solutions require you to have end nodes be connected to a single graph or there exists a puzzle where the solution has disjoint graphs? I'd also specify that no hanging pipes are allowed / utilize all pipes, although that part becomes obvious pretty quickly.
gereleth#
They all need to be connected into a single network. No hanging connections, no loops, no disjoint parts.

Load more comments