0 votes

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.

in Engine by (38 points)

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

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.

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.

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?

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.

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.

Please log in or register to answer this question.

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.