Can godot connect a normal server?

Godot Version



Hello I have a question.

Can godot connect a normal server for example a normal php server?

Let me explain what I am asking. You know for making online games you can use peer to peer but it doesnt work always. So another way is connect via server. I know you can use game servers but I want to know can I use a regular free php server to connect players? Or can I do port forwarding or something like that to connect 2 or more person with normal server and godot? :grinning:

I think there is nothing like a “normal server”. In the end you send bytes over the network. But to answer your question yes. You need to know your protocol and your encoding if you want to write your own UDP or TCP client. If you want to make a http request, Godot got his own node for this.

1 Like

Thank you for your answer @hydraware :smiley:

I mean to say for example you dont have a game server but you have an account on server wich you can upload your website.
For example I have a web site on server. They are giving me hosting and domain. Can I use this domain to connect 2 or more person with godot?

That is not how computers work. You are equating a php web server with a game server. While you can technically make this work, I think what you’re trying to do is just far beyond your knowledge. Using a remote computer to coordinate games made with godot is possible, but it is not as simple as “a website on a server”. You need to write and read data in some format and using a web server for that is probably not ideal. Possible, but harder than it needs to be.
If you want to coordinate godot games, you are better off using the RPC nodes or maybe a call directly into and online database server, not just a web server.


Dont worry about that. You can do almost everything. If you wanna do things like that, you should read a book about network protocols. (Or at least a few videos)

Play with with the HTTPRequest node if you wanna go with webservers.
(I never needed it).

If you wanna go with real-timer servers, you could write your own server. (This will be hard) but maybe there are assets or better options for this.

1 Like

Thank you for idea @Efi ! :smiley:
Maybe I found a way!
And I am a web developer also but still I am learning.
Can you just explain RPC node?
What is it and what it does?
Thanks again!

thanks @hydraware :smiley:

can you suggest book or video? (video is better)
thanks again!

An RPC (Remote Procedure Call) Node automatically syncs data between remote instances of your game. You can learn more in the Godot manual, but it is high level stuff that may or may not be what you want.

Thanks @Efi !
It looks like what I am looking but can you explain more what it does?
And is there a tutorial for HTTPRequest and High-level multiplayer for godot 3 to I can follow it?

Personally, I am out of my area of expertise when talking about networked games, honestly. You can switch the version of the manual on the bottom-left corner of that page.
I hope someone else can help better, but you are not explaining your objective, which is important information to guide you.

Go with this one.

If you followed this tutorial, (client and server)
Try to write your own client in Godot and send some bytes over it.

I never used a RPC node , so I cant give you any advice.
But in low level networking, you can do almost everything with TCP an UDP.Take your time, and learn about networking.

I explained my objective I think. I am trying to connect 2 or more person via web server. For example a multiplayer game via web server I am trying to do

thanks for tutorial but is there a tutorial for godot?
Or this tutorial works on godot?

After this one im out.

As Efi mentioned. A web server is not a game server.
You have to do the tutorial, to learn how to send a “hello world” over the network.

Python is the easiest language for this.
GDScript is similar to Python.

If you wanna go the godotian way, you got this class.