0 votes

I ran a multiplayer on my laptop setting it up as a server. Now, I need to run the multiplayer HTML5 in a browser (chrome). I have uploaded the file to itch.io for testing. The game requests an IP. What IP do I need to use?
I am new to Godot and networking and I would really appreciate your help. Thank you

asked Jan 30 in Projects by rodicausa (12 points)

1 Answer

0 votes

Hi, unfortunately as per security limitations you'd have to host html pages and Godot backend on the same server.
Please note that this isn't a Godot limitation per se, but rather a browsers' security feature that is not going to change. You will have to use a more complete hosting solution eg. a cloud vps.

Regards,
ale

answered Jan 31 by oj (14 points)

This is not really due to security limitations, but rather that native applications and Web browsers use different protocols to communicate (the former uses UDP in Godot with the high-level multiplayer API, whereas the latter uses WebSockets which is slower).

I must admit I don't know how OP have implemented his game but I think he could port it anyway to WebSocketServer (otherwise that is, no html multiplayer at all). Origin policies et al. are a much rigid obstacle though, given they are security features. So it wast just my 2c about that :)

Thank you for your reply!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.