Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solicitation - multiplayer class thinking about communicating with external servers #13206

Closed
perdugames opened this issue Nov 23, 2017 · 5 comments

Comments

@perdugames
Copy link

perdugames commented Nov 23, 2017

Void Linux - Godot 3

Issue description:

Godot already uses Enet, and already has a high level API for multiplayer, however I always need to communicate with external servers and I believe that most game developers tend to create multiplayer with external and non-local servers, at least for Android this can be said, and I miss a simple client in godot.

Taking the example of the class "NetworkedMultiplayerEnet", it uses Enet, however it includes in the packages sent 12bytes non-native Enet, which complicates when you have an external Enet server to communicate.

I request a pure Enet class, which only sends reliable and untrusted messages in a simple way, just by calling a function, and to listen in a simple way so that it can easily communicate with an Enet module on the external server. Of course you can use multiple channels as Enet allows. It could even be part of the Enet module and be another class, I think it would be very useful for many developers. I could write it, I'm not the best programmer in the world, but I have time, and I can write it.

@Calinou
Copy link
Member

Calinou commented Nov 23, 2017

Have you looked at the intermediate-level NetworkedMultiplayerPeer class? More information can be found in the high-level multiplayer tutorial.

@perdugames
Copy link
Author

perdugames commented Nov 23, 2017

@Calinou Yes, the "NetworkedMultiplayerPeer" inherits it, it is an intermediary class only, and with pure virtual methods, I can not use it, the one I use is the "NetworkedMultiplayerENet" that actually implements the methods, but here comes the question that I raised above, the class ends up limiting just the communication between client and godot servers. I think it would be nice to have a pure base class Enet, to send and receive messages with the possibility of communication with Enet modules on external servers, and then a class that inherits it to implement the high level API, but it has already been implemented, so the best would create another separate class.

@reduz
Copy link
Member

reduz commented Nov 23, 2017 via email

@perdugames
Copy link
Author

perdugames commented Nov 25, 2017

I ended up finding an Enet module for Godot 2.1+ and translated it to Godot 3.0, here it is. It tested and works normally with external servers. https://github.com/PerduGames/gdnet3

A class like this module could be implemented in Godot. It could be the base class that the "NetworkedMultiplayerEnet" class would inherit to make its high-level multiplayer. So who needs to use pure Enet could, and who needs to use API high level multiplayer as well.

@mhilbrunner
Copy link
Member

Closing this now, as these are available in third-party modules (https://github.com/PerduGames/gdnet3) and also there were recent PRs improving/exposing more of this (#18827, #18823)

@mhilbrunner mhilbrunner added this to the 3.1 milestone May 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants