Links
-
Live Demo: http://samepage.garrettburroughs.com/
Summary
Samepage is a two player game inspired by a video I saw on Tik Tok. The concept of the game, is that the two players each think of words induvidually to start, and then each guess should be what the previous two guesses had in common. The idea is that the gap between the two words will lessen each round of guesses as the words get more specific, down to the point where the two players are able to guess the same word, or get on the “same page”.
Currently, the game allows for the random creation and joining of lobbies, as well as creating lobbies with a code that can be shared to play with friends.
Languages Used: Typsecript, HTML, CSS
Technologies Used: Sockets.io, Express, Docker
Takeaways
Creating this project gave me large insigts into how to handle multiplayer lobbies, synchronize events across browsers, and working with websockets in general. The entire lobby system was written from scratch, and the logic for ensuring that lobbies were created and joined in the correct order, as well as cleaned up when players left the game (whether it has started or not) was a slight challenge. While the system has never been stress tested at a large scale, it has covered various edge cases.
I also decided to host this project on a digital ocean droplet, and deploy it using docker. Because the application has both frontend and backend services that require various dependancies and setup, docker seemed like a great way to streamline the deployment process.