For this assignment I extended my pervious assignment, Stargazing, to create a multi-user interactive drawing experience using p5 and socket.io. Now users are able to create constellations with each other, since they all are able to see the same placement of stars. Also, the connections that one user makes will be displayed to other users. To help differentiate the users, each person is assigned a unique shade of yellow, used to create constellations. When someone clicks the “Generate Stars” button, stars are re-generated for all users. The “Clear Constellations” button is used to remove the lines for all users, while maintaining the positions of the stars. In addition, I added features so that users can add stars and drag existing stars, which will be displayed to other users. To help reduce confusion I also added instructions to the top of the page so that users know how many stars they’ve clicked and when a line will be created.
Here’s a link to the code on GitHub