Awesome_E Awesome_E
GitHub Experience Projects

The Inspiration

So I’ve had some history of maintaining a modified project player for the Hopscotch app. Along this journey, I wanted to do something the platform had never seen before: online connectivity. As the developer of an app or game, one of the best feelings you get is being able to make something that people enjoy using, and online multiplayer is a great way of achieving just that.

William04GamerA: "Wow, this is so amazing. Blows my mind that this is possible - great mod. I'm so excited to see what can be done with this." AwesomeJediE: "oh my this is incredible
I'm a soccer ball and there's another moving soccer ball!!!" Ren: "I love how into this everyone is
It's cool to think how much all this can evolve but right now we're like THE SOCCER BALLS ARE MOVING" anan64955632: "we are making history with a few soccer balls right now"

A few years ago, I used Firebase’s realtime database to handle this. However, it became evident that while Firebase was easy to set up, it was not designed to constantly stream data like you would in a multiplayer game. I was then inspired to make my own multiplayer system which was able to perform the same actions but in a system that was designed to handle this.

How it was Built
NodeJS Logo MongoDB Logo JavaScript Logo Jest Logo

The backend of my Realtime Multiplayer System was built using Node.js, Socket.IO, and MongoDB. It handles all the logic from joining rooms to changing settings and reading/writing data. I achieve realtime functionality through the user of replica sets and change streams, which allow me to emit data through websockets to all connected clients. Using a DBMS like MongoDB also means that users can join after the multiplayer session has started and still receive all data associated with the room. I also wrote tests using Jest to ensure that functions like putting clients into the correct room worked properly.

The frontend code is part of my public Hopscotch Tools project, and it uses JavaScript to communicate with the backend for projects with multiplayer actions enabled. Its implementation works similar to other actions in my modified project player, which lets users add a custom block to their code to specify when they run.

Demo Projects

While these projects are unfinished Hopscotch games, they demonstrate the capability of the realtime multiplayer system. Feel free to reach out to me at [email protected] for a demo!