Multiplayer Library for Browser Based Board Games
⚓ Rust 📅 2025-12-26 👤 surdeus 👁️ 6Hi,
I created a library, a base server, and an example for browser-based board games:
https://github.com/Carbonfreezer/multiplayer
The server part is a game-agnostic relay server, and the library loosely follows the client-hosted server philosophy, as in Unreal Engine or Network for Game Objects for Unity. It is in a reduced form, though, and primarily optimized for round-based games. It works with Macroquad and WebSockets, both in native and WASM builds. There are two specific solutions in there you might be interested in, even if you do not want the library as is:
- If you want to integrate macroquad with web sockets, "quad-net" would be the natural choice. This does not work with binary WebSocket messages, though, and the non-WASM version also seems to be outdated. I implemented a local solution using ewebsock and a miniquad plugin for WASM to solve this.
- If you integrate egui with macroquad, you get a problem on mobile, because the keyboard does not show up. This is also solved with a miniquad plugin and a hidden text field. I am told, though, that this solution does not work for Mac / Safari. If you have a fix for that, please let me know.
1 post - 1 participant
🏷️ Rust_feed