Server and Sockets

Creating a server

Through a youtube video, a bit of documentation, and my professor's project as reference, I was able to set up a server using express which dealt with self connections to my local device.

Note:

Prior to this project, I was considering using Spring Boot and Java for my backend

Sockets and rooms

Alongside Express for users to connect to a server, I picked up socket.io to allow users to communicate with each other. I took some of the information from the youtube videos which dealt with sending client to client messages and instead took a client's input and expressed it to everyone connected in the form of points and their roll of dice.

filler text

Frankly the most time consuming and difficult part of this project ended up being rooms. I figured out about rooms early in the project when looking through socket documentation and thought it was super interesting. The reason for implementing rooms allowed for multiple games to be going on at the same time.

Note:

This was the buggiest feature I've made! Tons of testing were required to fix bugs such as:

- improper count of players being displayed

- removing users under multiple circumstances

- rooms not being successfully joined due to socket ID changes

and so much more... check out the commit history for all of them.

filler text