Open Calinou opened 3 years ago
Both WebSocket and WebRTC have dedicated tutorials. The websocket tutorial clearly states it's TCP-only:
The protocol is quite simple, message based, and a very powerful tool to send push notifications to browsers, and has been used to implement chats, turn-based games, etc. It still uses a TCP connection, which is good for reliability but not for latency, so not good for real-time applications like VoIP and fast-paced games (see WebRTC for those use cases).
Your Godot version: 3.2.3
Issue description:
We should have a paragraph on making a project that can use both ENet and WebSockets for high-level multiplayer. WebSockets should be used automatically on HTML5 clients since ENet can't be used there. This is because browsers can't send UDP packets for security reasons, and ENet is UDP-only.
The higher latency caveats of WebSockets should also be documented, since WebSockets is TCP-only and therefore forces all RPCs to be reliable. This makes it not well-suited to fast-paced games, but the UDP-friendly alternative (WebRTC) is more complex to set up.
See https://www.reddit.com/r/godot/comments/bux2hs/how_to_use_godots_high_level_multiplayer_api_with/.
URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html