Inspiration
We were thinking about a challenging game and we came up with the maze. It is a game that everybody knows how it works and if not, it is very intuitive to learn its rules. What makes it distinctive is the fact that we made it a race, where you have to solve the maze competing against other people live. It's a fast brainteaser that will bring your team together and give everyone a rest in any hackathon.
What it does
It consists in a multiplayer maze where you can choose if you want to play the classic one or the advanced version. The last one has a key that opens the exit which you have to get before escaping. The first one to do that wins the game. Also you can join games that have already started in case you want to play in a multiplayer version.
How we built it
We used node.js for the server combined with socket.io in order to connect client and server. The client is a basic html, css, javascript basic website. In order o draw the game we used Canvas with js.
Challenges we ran into
First challenge was building the multiplayer environment. We used web sockets, and in order to only use one port instead of two(webSockets and the main app), because this is what heroku allows when posting a server based application, we used a library called socket.io. Second challenge was thinking about the algorithm behind the maze, we wanted it to be random in order to make it more interesting every time and had to develop an algorithm to do so.
Accomplishments that we're proud of
We are proud of being able to create the game in a multiplayer format and also the fact that works as we thought about. We also found the algorithm using hamiltonian paths, and a set of tree and graph algorithms that would create a random maze in a grid that would always have one and only one solution.
What we learned
There were some parts of the code that we weren't familiar with such as the web sockets. So we learnt how to use them and how to implement them. We also had to learn to work with Canvas and js, since it's a game that needed it, it was slow and we optimised it a lot. Half of the team members had never coded with javascript nor used git, so they had to get the hands on that.
What's next for Hack The Maze
We would like to improve the project adding some new features like an extra maze level. It would consist in find the exit but this is located in an other maze accessible with stairs.
Log in or sign up for Devpost to join the conversation.