-
Notifications
You must be signed in to change notification settings - Fork 72
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
TCP and UDP support #27
Comments
Hey @rgzr. Thanks for the kind words. I'll answer each of these questions inline.
Yes Nakama supports UDP (technically rUDP - optionally reliable) on messages but it requires messsages between client and server to use our realtime protobuf format. I'll have a discussion with @Faless on what would need to be done to use Protobuf from GDScript. The optional reliability layer would also need to be implemented in the socket code.
Yes the WebSocket can be switched to binary mode instead of text format but it would also require Protobuf as described above.
Even in text mode you can send your binary payloads over the socket but they'll be base64 encoded so that the decoder can unpack the binary on the server receiver side. Hope this makes it clearer. |
Thank you @novabyte, this makes it much clearer. So, for now we can't send unreliable data. The best option for now is to send data through weboscket reliable transport using base64 encoded binary, and switching to rUDP with realtime protobuf when it's implemented. If help is needed maybe I can colaborate. |
@rgzr Yep this is the best approach (and in truth it works pretty well) until we find a way to support Protobuf in GDScript or bridge between GDNative and GDScript. You won't need to base64 your message content because the SDK already does that for you.
Would be great to collaborate I just don't have the time at the moment to investigate what's needed for Protobuf in Godot. |
Hey @novabyte , There is a protobuf implementation for godot: https://github.com/oniksan/godobuf I'm sure @Faless knows about it. I can't verify how good the godobuf implementation is, as I havent used it, but it's implementation does not require gdnative, which makes it extremely accessible and matches the design philosophy of the nakama-godot sdk. |
So is it currently not possible to use Nakama's rUDP socket? I want to build something that is server authoritative and uses rUDP, how should I go about that? Maybe use Nakama's LUA or Go implementation instead? |
@gdomaradzki Until its possible to interface efficiently with Protobuf generated netcode it won't be possible to use one of the other socket transports in the game server. |
Has there been any progress here with support for UDP in Godot? |
@dpweberza not at the moment though @dsnopek has been working on tighter integration with the Godot network APIs. |
Any update on this ? |
Did you find any update? |
As I understand, currently only http and websocket for the realtime are implemented, although nakama server supports TCP and UDP too. ¿Are there any plans on supporting UDP transport for allowing unreliable sending packets? TCP would be nice to have but websocket covers the same purpose.
Also, ¿can raw binary data be sent through the websocket? So, ¿is the en/decoding to base64 needed?
Thank you in advance and thank you very much for the work you've done, this technology looks promising!
The text was updated successfully, but these errors were encountered: