Is there a reasonable simple way to run my multiplayer game over the public internet.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By michaelpbl

I have built a multiplayer card game with a single server and multiple peers. It works fine when running on my single computer and also across my local net. All the multiplayer tutorials I’ve seen say all I have to do is specify the ip address of the server and the port. However, there’s no easy way to connect via the internet at large because of the problem of Network Address Translation(NAT). I’ve seen lots of discussion of things like TCP hole punching but most solutions seem to require a third party server to mediate; moreover, there seems to be a lot of roll your own needed. Surely there must be some standard solutions around. With my particular game, TCP is just fine as reliability is more important than speed.

Heroku maybe? Thats what i use for my multiplayer server, its not super fast but gets the job done and its free.

RazorSh4rk | 2020-05-16 07:38

Heroku looks interesting. However it doesn’t support gdl directly. How are you using it to run your game? Are you running your godot server on Heroku directly or simply using it to facilitate communications between you server and you client peers using something like TCP Hole Punging or plug and play? Are you writing code in node.js or utilizing premade services such as gd-com? I’m afraid I’m a complete newbie at the communication end of things. I didn’t know most of these terms until 3 or 4 days ago.

michaelpbl | 2020-05-16 13:51

I have my server written in scala, using a websocket, sadly there is no gd support in heroku. If you wanna write your server in gdscript, you can rent a vps and host the server but that will cost like 3$ a month.

RazorSh4rk | 2020-05-16 14:23

Thanks for your answer. You’ve been both quick and informative. $3 a month is way better than learning Yet Another Language and another technology. Do you happen to know a VPS that I can run GDscript on for $3 a month?

michaelpbl | 2020-05-16 14:45

scaleway (3 euros)
aruba (a bit under 3 euros)
vultr (a bit under 3 euros)

Just go with the cheapest options, get some linux on them, export your gd server to a linux runnable, use scp for example to copy the file to the server, use nohup to run it in the background.

RazorSh4rk | 2020-05-16 23:46

Thank you. You have been extremely helpful. I hope other new developers see your answers. In my case I think I will start with vultr simply because they have a server farm in Canada which is where I live. Also they allow me to run Windows which is my normal os.

michaelpbl | 2020-05-17 00:43