Matchbox for website build rollback
Description
Currently there is no online multiplayer in web build, I suspect it's because of ggrs don't support it. there is however a project to run ggrs compatible socket in WebRTC named matchbox.
Alternatives & Prior Art
No response
We should actually be able to test out a web build because our networking library Iroh has preliminary WASM support now.
We should actually be able to test out a web build because our networking library Iroh has preliminary WASM support now.
Sounds good, I am quite new to rust, how would you combine Iroh with ggrs to build the web netcode? thanks.
We already have pretty much all the ggrs and Iroh stuff hooked up, since that's what we use for native builds.
In order to get web builds to work we will need to update to the latest version of the iroh package in the Bones crates.
A lot of the actual networking stuff is handled in Bones, so to get developing you will want to clone the bones repo locally, clone the jumpy repo locally, and then uncomment these lines in jumpy to make it use your local version of Bones.
Then you can start working on the bones code and testing it in Jumpy.
There are a couple places in the code where we don't include networking code if we are in the browser with something like cfg(not(target_arch = "wasm32")). This is because previously we couldn't compile Iroh for the web. There's a couple places in this file where we disable the networking module when building for web in bones, and there are more places in Jumpy where we turn off a networking feature when building for web and we will need to now test that out for web.
There could be complications we aren't aware of yet with Iroh in the browser, or little differences that we might need to account for because, for example, we can't detect LAN games in the browser, we can only do online games through our matchmaker.
But hopefully that can get you started if you want to try it out!
I haven't had much time for Jumpy recently, but I'm glad to do my best to answer questions!