How can I set up a server in a different language?

Please recommend some documentation, guides, or videos that explain how to create a client in Godor and a server in another language.

Without knowing any specifics about your project (such as what kind of program you’re building, what your server language is, and what information you want to transfer between client and server), I can only give an incredibly vague answer. A full-on MMORPG looks very different from an arcade game that only uses the server as a shared leaderboard!

Design your network protocol. On the Godot side, use PacketPeerUDP or StreamPeerTCP depending on whether you want a tcp (stream-based) or udp (packet-based) protocol. Be aware of the drawbacks of udp if you choose to use it, and compensate appropriately. On the server side, use whatever network libraries are available for your chosen programming language.

If you want to use Godot’s high-level multiplayer API instead of designing your own protocol, don’t write the server as an independent program. Instead, write it as a GDNative extension.

What do you mean by another language?

You don’t generally have to translate a server, you only need to worry about text on the player’s screen.

I mean a godot client (where the player is streamed an image, key presses are captured, and everything is sent to the server) in GDScript and a server, for example in Python or C++.

That’s not quite what I meant.

Well, just make a server in the language you want then. It doesn’t matter if the server was made in Python or C++. It’ll work if you make it compatible enough.

Client just needs the IP and port of that server.

I understand that it’s necessary to ensure information exchange between the client and the server. On the server side, I understand how to create this, but I don’t know how to send and receive information packets to a third‑party server in Godot.

P.s. Perhaps it’s not clear written here. I meant when Godot is the client.

Oh, you want to use a different programming language to create your server while allowing it to communicate with Godot-based game clients?

The most basic way would be to use TCP, systems languages will support creating a TCP socket and Godot can communicate through StreamPeerTCP. This is low-level, slow, and blocking so it’s probably not a good fit for any Godot project but it would work and maybe clear up some fundamentals.

Realistically you will have to choose a format to communicate over and create both the server and the client to match. If you are making a web game that may be WebRTC or WebSockets, read up on those specs from MDN and implement them or use a library in your given systems programming language. If you are not creating a web game then using StreamPeerTCP or PacketPeerUDP will be pretty basic to work with, you might also be able to use ENet which is a great library but the set up for that may be more complicated server-side.