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
michannne#
Solved in 1:39, very fun game and great implementation! I'm not much a fan of pipes games but have played similar concepts such as Infinite Energy on mobile. This is a good job for such a quickly developed project
mikewarot1 reply#
Right click appears to do nothing... leaving an impossible to solve puzzle, as you've just locked a piece and no amount of left clicking will move it. Very frustrating.

Why would you lock a cell?

chungy#
You can right click again to unlock it.

It's fairly handy when you're certain it is the only possible orientation and you want to prevent accidental rotations.

Syzygies2 replies#
Wow! What fun. You have to make this a phone/tablet app...
gereleth1 reply#
Glad you liked it! I actually play it often on my phone, it's workable when zoomed in. An app would be nicer surely but I don't know how to build those =).
moomin#
You 100% need to figure that out, because this is _really_ good and there’s money to be made here. Make sure you’re the one who makes it.
mbusheikin4 replies#
Well, this seems an appropriate place to plug the phone/tablet app we made with these puzzles, called Noodles 2.

It's the same puzzle style, with square, triangle and hex shapes, with some extra mechanics - disappearing pieces, infinite grid (it wraps around).
gereleth, great job on the puzzles - I played a few of the bigger hex puzzles and it was real smooth. :)
https://play.google.com/store/apps/details?id=com.lummoxlabs... https://apps.apple.com/us/app/noodles-2/id1520711405

nathancahill#
That's awesome. Really slick app.
gereleth#
Nice graphics, I love the soft lines.

I have wrapping infinite grid variants too, but disappearing pieces? Intriguing =)).

joshcaron#
I just found Noodles 2 the other day when searching for a new puzzle game to play. I'm absolutely addicted to it; I've already completed hundreds of levels. Wish there was a way to "lock" a piece in place (like via long press) so I don't accidentally rotate pieces I've solved. Great game!
culi#
Hey I just mentioned your app in another comment! I don't suppose your app is open sourced haha?

Big fan of the original many years ago. Will definitely check out the sequel
Noodles and all the Conceptis games were the only puzzle apps I never deleted off my phone

Waterluvian1 reply#
This is a fantastic game.

I’m curious, did you use a special coordinate system for the hexagons or did you just make it work without any sort of coordinate system at all?

gereleth#
I didn't use any special coordinates, just some trigonometry. My code transforms coordinates between (x,y) - for drawing, (row, column) - for finding neighbours and (index into an array of tiles) - for managing state. It sort of grew organically and could probably be cleaned up a lot.

The hardest part was making the board repeat for the wrap variant making sure that all tiles have consistent wrap neighbours. I almost deployed a version that worked fine on odd-sized grids and went completely bananas on even-sized grids. The danger of always testing on a 5x5 board)).

Load more comments