This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

How can i add Online Multiplayer capabilities ?

AdgenoduxAdgenodux Posts: 9Member

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..


Tags :

Best Answer

  • CalinouCalinou Posts: 376
    edited November 2016 Accepted Answer

    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.

Answers

  • CalinouCalinou Posts: 376Admin Godot Developer

    In Godot Git, high-level networked multiplayer was added using ENet. It is not available in Godot 2.1, so you'll need to grab a recent build or compile Godot yourself.

    There are a few demos about networking here, in the networking/ folder.

  • AdgenoduxAdgenodux Posts: 9Member

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

  • AdgenoduxAdgenodux Posts: 9Member

    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...

  • CalinouCalinou Posts: 376Admin Godot Developer

    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).

  • AdgenoduxAdgenodux Posts: 9Member

    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...

  • CalinouCalinou Posts: 376Admin Godot Developer
    edited November 2016 Accepted Answer

    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.

  • AdgenoduxAdgenodux Posts: 9Member

    @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...

  • AdgenoduxAdgenodux Posts: 9Member

    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 ?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.