This weekend I got something quick and dirty together to support multiplayer over the network. I’ve had Windows, macOS, and Linux clients connected, with a mix of AMD64 (Windows and Linux) and ARM64 (Windows and macOS). There’s a rudimentary chat system in place for clients and the server to talk to each other. The networking side is using Valve’s GameNetworkingSockets library, although I had to create a fork to get ARM64 Windows builds working. I was tempted to build something directly on Rust’s UdpSocket, but in the long term using something state-of-the art is probably best here. For the Rust bindings I’m using a fork of gns-rs in order to get macOS builds working.
Right now, things are implemented fairly naively, and I’m not taking advantage of unreliable messages or client/server reconciliation. Those features/systems are next on the list.
But a post isn’t complete without a screenshot, right? Enjoy the server and two clients recreating the pointing Spiderman meme:
