An Elm implementation of the board game, PathFinder - a multiplayer maze game
PathFinder is a multiplayer maze game playable in your web browser, based on a 1974 board game of the same name. Two players secretly draw a maze for each other on a grid, placing the starting point and at least one goal (a pot of gold). Once ready, all the walls turn invisible. The players then take turns making their way towards a gold. When a wall is hit, that wall becomes visible, and it switches turn. First to a gold wins! 🏆️
It's a simple game, and it's great fun trying to anticipate what your friends will do and trying to outsmart them! 🧠 How good of a maze creator are they? Will they start by heading directly towards the gold? Will they try every possibility on the way, or move ahead blindly? Will they fall for the trap of this dead end? Should you try reverse-psychology, or perhaps reverse-reverse-psychology? Where on the board are even the edges of a size-bounded maze? Good luck! 🚀
Tip: given it takes some time to draw a maze, for a shorter game, agree on a size for the dimensions of your mazes. Draw a box of that size, then make the maze within. 6x6 is a good starting point, and I play that often.
The game supports both same-device multiplayer and multi-device multiplayer; the latter is pretty basic so far though, so don't move your opponent when it's their turn! 😉
You can play the game here:
➡️➡️➡️ https://pathfinder-elm.netlify.app ⬅️⬅️⬅️
I'm using this an opportunity to learn a pure Functional Programming language! 😁 Elm seems like a great choice for its ease of use, and I'm finding the Elm Guide very approachable ❤️
My hope is for this modern rewrite to eventually be able to run on smartphones as an installable app 📱
As much as I dislike PHP, I chose to use that to write the backend, since I only needed something simple and it would allow it to be cloud-hosted for free (on my legacy DreamHost server I already have) 💸
This is my fourth attempt at writing an implementation of the game.
Versions:
Install:
To install development dependencies (only supports Arch Linux, currently):
$ ./scripts/setup
$ ./auto/dev curl -sSN 'backend/backend/db-setup.php?reset&password=pathfinder_elm'
To run the app with live reload on code changes:
$ ./auto/start
$ ./scripts/start
To build the app to the dist
folder:
$ ./auto/build
$ ./scripts/build
To runs the tests:
$ ./auto/test
$ ./scripts/test
Browser.Navigation.Key
, but I found I can instead use elm-specswitchMazes
from somewhere betterList.concat
to (::)
operatorreturnToOriginIfPathUnclear