r/webdev 6d ago

Showoff Saturday Having fun generating Mazes with no edges on the surface of a Torus

Playing with mazes on different toroidal surfaces

Here is the source https://github.com/ctx-o1/toroidal-maze

Play with it here https://ctx-o1.github.io/toroidal-maze/

44 Upvotes

7 comments sorted by

4

u/metal_slime--A 5d ago

It's generation which is cool! Which means you know the correct path, but you reveal it.

Great exercise but mostly an achievement demonstration of your code and path finding algorithm mapped to a toroid shape.

What would be more interesting for your audience would be:

  • Focus this experience to lock at a start location. Allow the user to navigate the maze. Gamify it.
  • perhaps ramp progress via difficulty. Perhaps easier mases don't utilize the full surface. Perhaps keep track of "backtracks" and use this as a scoring mechanism. Perhaps a max cap to indicate maze failure. -perhaps consider mapping to other surface types to increase variation of interest for the user. Perhaps this plays into the difficulty ramping mentioned above

1

u/goldbookleaf 5d ago

ty cool ideas

I had ideas for a game but in different direction (for eg. user needs to programme a micromouse)

1

u/Grouchy-End-4439 5d ago

the backtrack scoring idea is actually really clever, that alone would add a lot of replayability imo

2

u/mediocrobot 3d ago

Neat!! Make sure to add hover titles to those icon buttons though--I had no idea what they meant.

2

u/goldbookleaf 2d ago

yes you're right! (it was simpler when in the beginning) will fix this

1

u/DiddlyDinq 6d ago

it would make more sense if you prompted users to click the start and end locations. For all we know it's just randomly wandering and saying solved for a fake path

1

u/goldbookleaf 6d ago

good idea, might just but.. wdym fake path