hey guys, I want to implement online multiplayer gaming on mobile using the WebRTC protocol to reduce latency issues. While reviewing the official demo code, I noticed comments regarding WebRTC, mentioning that relying solely on the STUN protocol may not establish direct client-to-client connections, and even with a TURN server, high latency issues may persist. I would like to confirm if the current version of Godot still supports the WebRTC protocol on mobile platforms.
The official demo’s link is as follows: godot-demo-projects/networking/webrtc_signaling/client/multiplayer_client.gd at master · godotengine/godot-demo-projects · GitHub
WebRTC mobile limitations aren’t a Godot-specific problem. It’s because of the way networks are set up in mobile phones, direct P2P connections are very hard.
Godot’s WebRTC implementation will try to use STUN (P2P) if possible, falling back to TURN (traversal using relays around NAT) when needed.