Hi there! I'm making the online game on HTML5 platform. I need to make client-server architecture connection because my game is competitive game and peer-to-peer isn't suitable (quite easy make cheats).
I already did client-server using by high-level API and it works fine. But when I export my project to HTML5 to test it I was surprised that high-level API doesn't work there. Later I found out that for HTML5 platform I must use WebRTC and WebSockets directly on your own. Ok, it's confused me but ok I went to documentation about these things. And here I absolutely did understand nothing.
I need to use UDP protocol and client-server but for WebRTC as I understood I need to use WebSockets but WebSockets works only with TCP. And as I understood WebRTC in godot implemented only for peer-to-peer.
I thought maybe I can to make one server WebRTC peer and connect other peers to it. But even unclear how to make remote connection using by WebRTC because on the documentation wrote nothing about remote connection.
All in all, it's difficult and below I wrote main questions.
- Maybe does exist a way to use High-Level API on HTML5? (If does, the questions below aren't matter)
- Does exist any good explanation how to use WebRTC in Godot?
- How to implement client-server using by WebRTC? (With using TCP/UDP)
By the way, I know that exist demo project with WebRTC. But there using peer-to-peer connection with WebSocket as signaling server. I don't need it.
Thanks in advance!