|
|
|
|
|
by emadehsan
1431 days ago
|
|
My understanding is that since the game mentions: "Rotate the tiles so that all pipes are connected with no loops." These is exactly what a Spanning Tree is. So, any spanning tree generation algorithm would do. You just generate a random ST each time and cut this tree where the hexagon borders intersect with it (to get pipe pieces) and randomize their orientation. These algorithms are not going to disappoint you in terms of performance. I made tutorials on the topic as well. Might help me clear my point: https://youtu.be/d5yzKkG1n1U?t=36 Apologies for spamming. Sorry, if I'm suggesting premature optimization. |
|
An efficient generator could perhaps even work client side, so I wouldn't have to store premade puzzle instances in the repo. That would be cool =).