0 votes

Hello again guys!

I have a problem, i need make a game that have multiplayer with internet... i already read about the high level network of godot but i dont understand some things:

I need a server to make this type of game, true? i need to do any special step in my server to use with godot?

I use this to start the server (i really don have idea of what i do lol)

  var SV = TCP_Server.new()
  SV.listen(2750,"138.219.40.174") 

where that number ip is the ip of my host

and i do this to connect to host (dont laught pls xD)

var connection = StreamPeerTCP.new()
connection.connect_to_host( "138.219.40.174", 2750 )

this is the part of the code that i think is most important.

I really will appreciate all kind of help, an article to read, a chunk of code or a kick. (or a suggest to read again an article xD)

Note1: (I already read the high level network tuto of godot but i didnt see where i can implement my server)

Sorry for mi bad english ;p i really are very noob on networking

in Engine by (36 points)

1 Answer

0 votes

Don't use TCP, I'm 99% sure that it's not going to work well for you. Use UDP only.
Take a look at High level multiplayer, you will learn how to create server and connect client, how to communicate with server, etc.
And if you are going to work on game networking then here is your new book before sleep - Networking.

by (378 points)
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.
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.