For the past few months have kept myself busy working with the Urho’s web port. One thing that bothered me alot was the lack of networking in the web builds. With that being said today I’m proud to present to you my proof-of-concept for the networking in the web builds.
I’ve tried to implement https://github.com/HumbleNet/humblenet/ library in the way that it was supposed to be implemented. Sadly it didn’t quite work that well and the networking was usable on half of the computers that we tested (thanks to other members in the community!). So I had to get rid of WebRTC support and do a plain server-client implementation using websockets.
HumbleNet already has built in support for websockets, but not in the way that is needed for true server-client mode. So I did quite few hacks here and there, bunch of workarounds, bad code practices etc.
So with that all being said here’s the actual demo of if:
Everything that you see in the game is controlled by the server, you will see the replicated state of it.
Just open the link, press “New Game” and click on the “Flatland” image to start the sample. Sample is based on this project: https://github.com/ArnisLielturks/Urho3D-Project-Template
If you notice any problems or crashes (or typos), please provide the stack trace from the dev console so I could keep improving it and hopefully make a PR to make it a part of the engine.
The codebase with the HumbleNet implementation will be shared a bit later, have to make it MIT friendly first since the new networking library depends on a lot of other stuff.