Kehom/GodotAddonPack

[Network] Abstract data layer

yuraj11 opened this issue · 3 comments

It would be great if one could simply swap data layer - let's say you want to use steam networking API layer for sending and receiving packets.
Currently everything is based on rpc calls but it would be good to use some abstract layer between sending and receiving data in network.

For example there's readP2PPacket and sendP2PPacket in steam library:
https://gramps.github.io/GodotSteam/functions-module.html

At one point I will need this feature so it's possible I will take look on this future and create PR.

Kehom commented

Ok, so what exactly is the use case to switch over to send/readP2PPacket instead of using RPCs?

I did some preliminary research on the Steam API in order to try to at least have a guide on how to use it to automate the host_game and join_game based on the friends list. I didn't go far with the research though, but this simple case would not require a "drastic" change in the Networking addon.

Just know that I'm not closed to the idea, I just have no idea of the use case.

The main benefit is simplicity of playing together between friends using P2P without solving router port forwarding etc. You can simply create server using the steam API and invite steam friends to play together.

But I have tried this API a long time ago and the P2P stuff is deprecated: https://partner.steamgames.com/doc/features/multiplayer/networking

....but it looks that godotsteam supports the new API (according the module source code):
https://partner.steamgames.com/doc/api/ISteamNetworkingMessages

Kehom commented

Ahhh, OK. That seems very interesting to provide an easier experience for players with less technical knowledge.

I will take a closer look into it (and some of the other issues) as soon as I finish working on the next tutorial which is about creating dedicated servers with Godot. A few improvements to the addon might come along the way because at least one of them is absolutely necessary (related to the credential system).