I've made a simple multiplayer game using socket.io, and took a lot of help from YouTube and the Internet on how to do it. However, the tutorials only talk about how to run the server locally, and none of the ones that I followed ever talked about running the server online - and I looked through a lot!

I think that I only need to add my server IP to my Javascript file, and match the socket.io inspector property value with it.

How do I make my offline socket.io server go online?

  • \$\begingroup\$ Usually, you would get an IP address from your hosting company and you would give it a name such as mygame.com and then register that with a DNS service and then you would you http://mygame.com/whatever to contact your server. \$\endgroup\$ – jfriend00 Apr 10 '17 at 5:24
  • \$\begingroup\$ @jfriend00 could you write that with it's syntax? java script and it's frameworks are not really my strong suit! \$\endgroup\$ – SIMMORSAL Apr 10 '17 at 5:37
  • \$\begingroup\$ Welcome to GameDev! Please note the change I made. Your asking an XY problem, where your title describes problem X, but your question asks about solving it with problem Y. Since you admit not knowing for sure if this actually is the correct solution, best to stick with problem X. If your correct, a good answer will still tell you how to fix problem Y. If not, a good answer will correct your understanding, and still tell you how to solve problem X. \$\endgroup\$ – Gnemlock Apr 10 '17 at 9:23
  • \$\begingroup\$ @Gnemlock in the last hour i learned enough to know that my question is incorrect, but not enough to correct my question, or answer it. if i don't find the answer soon, i will delete the question. thanks anyways. \$\endgroup\$ – SIMMORSAL Apr 10 '17 at 9:38
  • \$\begingroup\$ @SIMMORSAL, if your unsure why your question is flawed, leave it up. It might help others, and feedback may still set you on the right track. \$\endgroup\$ – Gnemlock Apr 10 '17 at 10:34

in this picture is what i learned about my problem and how to fix it. hope it helps someone else too.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.