Having left behind everything I was working on due to the nature of my hurried exit from London, I was at a loss for how to continue my project. I had been hoping to build a system of winches to move illuminated sculptures in and out of reach of viewers based on the actions of the viewers. I am unfortunately not able now to build these devices as I no longer have access to either the facilities in the lab, or the various tools I had in my flat as I wasn’t able to bring much home with me besides clothes.
I therefore decided to pivot what I was working on into something that is solely online. This of course means somewhat starting from square one. I decided to put off working on the idea for the actual artwork that I will make for a while as I am quite overwhelmed with everything that has changed in the last couple of weeks. I have instead been working on a game that I can play with my friends during lockdown.
I have been attempting to render the drinking game Ring Of Fire as an online multiplayer browser game. I am accomplishing this using websockets on Node.js and Pixi.js for the frontend rendering. I have found it has helped my mental state to be able to make fast progress on something. I split the development up into many small parts so every day I could come away having accomplished something even if it was small.
I started with the basics of how the back and forth of the data would work. I created objects for player and card data and structures that would allow those to be passed back and forth between the client and server. I then instituted a turn system so that only one person could overturn a card at a time. On the visual side the trickiest element was designing an algorithm which would present the players in a circle with equal distances between them and always present the local user at the top and center. Using pixi.js also presented limitations to how sprites could be altered once initiated, limiting me to changing the brightness of sprites rather than exchanging the textures.
The server, as it is written in node.js presented a challenge to find a suitable host. I tried a few different solutions before settling on Amazon Web Services free tier. This provided ample bandwidth for my purposes as only one set of clients would be connected at a time.
I tested the game with a few sets of friends while on a zoom call and the first game did present quite a few bugs which I had as yet not addressed. These included an omission I had made to handle clients leaving once the game was started. This basically caused the game to crash as there was a mismatch in player count between the clients and server. If I started over with this I would find some way for clients to maintain a socket_id on the server which currently changes with each connection and is what I use to keep track of connected clients as it is native to the socket.io library I am using.
In the fullness of time I’d also love to incorporate sound and video functionality so a person can appear above their name in the game in real time. Some investigation suggests the platform Jitsi being open source would lend itself to this however it would require a complete rewrite to incorporate Jitsi’s room management system. This would also require much higher bandwidth hosting and would be more difficult to test locally at scale.
Github Link https://github.com/RobHallArt/RingOfFireOMP-Server