Inspiration

Being rubik's cube solvers, we always wanted to compete with fellow speedcubers. There are applications out there that times a single player for solving a scramble, but none that allow multiple players to compete. This inspired us to create an online game where multiple rubik's players can compete with fellow players.

What it does

Our application connects two players from anywhere across the world and provides a random scramble to begin with. Once the players are ready, the timer starts and when they are done, the timer stops. The winner is declared based on who solved it the fastest.

How we built it

We used a multiple client and single sever model using express and node.js to implement the back-end logic and manage the front end contents that the players see. This is the app flow:

  • We let the players choose if they want to play a single or multi player game
  • Once, they are ready to start the game, we provide a random scramble to begin with. If it is multi player, then all the players in that session see the same scramble.
  • Once everyone is ready with their scrambled cube, they start the timer and end it once they are done. Note that, this is an asynchronous timer, so all players may not start at the same time.
  • The winner is declared after all players have completed the game.

Challenges we ran into

  • Most game and chatroom tutorials heavily depend on the assumption that all users see the same view. One of the biggest challenges we faced was how to create different views for both the players having their respective timers, and let the server communicate to a chosen client but still consider both on the same session (or room).
  • We have an open source graphical version of the rubik's game that we modified and is currently, in the PoC state. Some of the open source dense projects require thoroughly understanding the working of their code. As the code wasn't documented, it was difficult to understand some of their algorithm design decisions. Due to the time restriction, we are still yet to integrate that, but have an independent version of just the graphical cube working.
  • All of the team members were new to web development and using javascript as the back-end. We often ended up changing our algorithm design a few times when we came across newer and helpful packages. This had some overhead of changing some of the dependencies, but we did it!

Accomplishments that we're proud of

  • The overall product of our online game
  • Learning front end web development in less than a day
  • Awesome team collaboration
  • Using both react and nodejs

What we learned

  • How online games work
  • How to manage multiple players into groups of two
  • Front end and back end web development and deployment using javascript

What's next for Rubik's Arena

  • Though the rubik's community is more comfortable with solving the cube manually, we look forward to integrating a graphical cube, so that everyone gets to play it at anytime, anywhere and don't require access to a real cube.
  • Create leader board and provide a user to keep track of their records.
  • Allow users to challenge a player of their choice.
Share this project:

Updates