A node.js application that uses Express and Socket.io to create a multiplayer flappy bird game, where users can play and connect real-time.
The web app begins with prompting the user to either sign-up or login. All user data (usernames, passwords, and high scores) are stored in a SQLite3 database. To maintain user privacy, the passwords are encrypted using bcrypt.
When one person starts the game, the game starts for all active users at the same time. During game play, you can see other people's scores and their color font turns red when their bird dies. The UI for the game is seen in the demo video below.
demovid.mp4
In a separate table of the database, a Leaderboard is kept for the top 10 highest scores and the corresponding usernames. The table is always kept in order from highest to lowest using a 2D version of bubble sort.
There is a chatroom on the right-hand side, so users can interact with each other directly. The purpose of this add-on was so users can communicate when to start the game, and if some users die early and get bored, they can also communicate to pass time until the game finishes. Similar to the flappy bird game itself, the chatroom is built using Socket.io for real-time communication.