Hi all and thanks for approval.

For a personal project, i'm looking for an engine and Godot was one of my fav selection.

However, i need to build online multiplayer architecture (cross-plateform), and Godot don't seems to provide it natively (yet ?).

So is there a (noob) way, without hard coding (possibly scripting), to insert multiplayer management into a 2D project (tetris/pacman/pong like), using i.e. a third party extension/plugin/lib… and to be hosted on a linux dedicated ?

I'm not looking for complicated games, at first, i only want centralize results of individual players on a global ladder (to organize tournaments) but i aim to extend to multiplayer rounds, a bit like Njam, a pacman like that lets up to 4 players into network coop or duel modes.

As beginner, i can't figure out exactely how it works but could it be realist to use i.e. a forked Game Maker Multiplayer Engine (GMnet) to add multiplayer capabilities to Godot ?

Isn't it possible to dev connections between them as they're both open source ?

Thanks for clarification..

whaaa nice... got a look immediately, thx... :)

13 days later

well,

after a look and studying a bit about Godot, networking still not be a piece of cake...

a good related tutorial is missing...

correct me if i'm wrong but as i understand, the engine exports to win, linux... but it is the executable... so the networking options are built in...

however, i'm looking to host the game server on a remote server...

does that means it needs a more low level 3rd party (supposed server side) ?

thanks for tips...

however, i'm looking to host the game server on a remote server...

This is not a problem, you can compile and run a dedicated server for Linux (more platforms for dedicated servers are coming soon).

However, there might be small code changes to do in order for your project to use a dedicated server rather than a client acting as a server - nothing big, but it's not documented yet (no "dedicated server" demo is available yet).

Hello and thanks for your comment...

@Calinou said: This is not a problem, you can compile and run a dedicated server for Linux

could it be done under python ? are there some network/multiplayer related libs to use for ?

@Calinou said: However, there might be small code changes to do in order for your project to use a dedicated server rather than a client acting as a server - nothing big, but it's not documented yet (no "dedicated server" demo is available yet).

what could help me to do it ? in your opinion, could studying python appropriate ?

Globaly, how does Godot networking/multiplayer devdevelopment evolves ?

Thanks for your precisions...

could it be done under python ? are there some network/multiplayer related libs to use for ?

If you do that, you won't be able to use the high-level API. You can run a dedicated Godot server on a VPS, it's no problem for sure. Libraries are irrelevant here because Godot does everything a multiplayer game needs already (or almost); it can also do HTTP requests for example.

what could help me to do it ? in your opinion, could studying python appropriate ?

Learning Python will help you in using GDScript since GDScript has the same syntax (and is also object-oriented).

Globaly, how does Godot networking/multiplayer devdevelopment evolves ?

You don't really need low-level networking knowledge to use the high-level networking API, the basics will be enough.

@Calinou said: You can run a dedicated Godot server on a VPS, it's no problem for sure. Libraries are irrelevant here because Godot does everything a multiplayer game needs already (or almost); it can also do HTTP requests for example.

well, very happy to learn it, due to it's poor related documentation, i was not aware it was so advanced...

i'm going to look at the API and trying to understand how that works...

Many thanks for the infos, i'll be back later as needed...

Well,

By the way, could have some people opened to the idea to create together a simple functional online multiplayer demo project, focusing of course on the online multiplayer section and with a nice documentation, to help, mainly beginners but not only, to deploy online games without runnng all over the net ?

6 years later
2 months later

hello people from the past... I think godot actually did update their multiplayer... or is that just me?

a year later

Multiplayer is added for sure, but i found out that max players are 32.

Is there a way to have mmo like servers? 1k players and more?

32 is kinda limiting.. why is there a limit?
EDIT:
Digging up the corpses i found out

Create server that listens to connections via port. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use set_bind_ip(). The default IP is the wildcard "*", which listens on all available interfaces. max_clients is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see create_client(). Returns OK if a server was created, ERR_ALREADY_IN_USE if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call MultiplayerPeer.close() first) or ERR_CANT_CREATE if the server could not be created.

Still 4k players.. we need additional pilons!

I suppose for a such solution you would need something beyond godots networking solution. The idea is to have several servers and then some kind of router that dispatches players to different servers. Godots networking works for smaller games but requires a lot of wrapping-your-head-around quirks. If it was me I would directly send and receive packets and then do something with the data. No binding to scene trees and nodes, no node ownership, no scene syncing, no @rpc annoted functions. Just send and receive data, IMO it would be much simpler.

    gocat are there tutorials for this "withouth rpc"? Im walking through one RPC tutorial, and yes, its a pain to wrap your head around with what properties to bind and how to lay out them rpc functions..

    Not as easy as making your game for single player and then adding some few nodes for mp. šŸ™

    For 2D maybe its simple, but for 3D its not so simple.

    Sadly, with godot network, you are stuck with that rpc tangle. There are some even higher-level networking that work like magic, needless to say, I don't like it. It uses less, if any, rpc, and instead if I understand it correctly, syncs variables and stuff.

    Actually 2D and 3D do not matter in terms of networking, it is the complexity of the game that matters. You can have a complex 2D game or a simple 3D game. Of course, 3D brings additional challenges in the long run, for example, distance, character position orientation, and so on so you might need to send more data. As long you keep it simple it will not matter much.

    gocat I suppose for a such solution you would need something beyond godots networking solution. The idea is to have several servers and then some kind of router that dispatches players to different servers.

    That's typically called instances and shards in the MMO domain. A shard is a cluster of servers serving a 'world' or region. And instances are for an example dungeons that a group might enter. Even if multiple groups are running the same dungeon at the same time they wont see each other or affect each others experience of the dungeon since they are in different instances.

    Godot should be able to accommodate a MMO games client needs fine enough, though in some cases extra modules or addons might be needed to achieve that. However running godot server/headless build for an MMO server infrastructure is indeed probably not tenable.