-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
P2P #11
Comments
Current project is on hold as I am occupied with other things. It would be nice if we have new contributors otherwise I will continue to work on in in 1-2months. |
Is godot have network transport layer if so could you give me link of example, i will try to write it |
I was looking at this myself, I think you have to inherit from PacketPeer for the transport layer and MultiplayerPeer for connection creation/management. https://github.com/godotengine/godot/blob/4df80b0e629e25653a706f6721c13a1f9d1da368/modules/enet/enet_packet_peer.h Best guess would be to look at the enet stuff and try to rework that I think. You then set the active multiplayer peer with multiplayer.set_multiplayer_peer in GDScript. |
Oh this looks promising. What I had in mind was to not use any Godot specific network but rather directly implement the P2P interface given by EOS. Is there any pros or cons of using either method? |
Well i think you have to map the EOS P2P layer onto the godot PacketPeer and MultiplayerPeer classes, basically create eos_packet_peer.cpp/h & eos_multiplayer_peer.cpp/h. Then the higher level godot multiplayer stuff works normally as I understand it. If you look at PacketPeer it has virtual functions get_packet and put_packet which would need to be mapped to EOS P2P calls to receive and send packets over EOS. |
I was just showing the enet one as an example of how godot uses the base class internally for the default transport. Basically it would end up something being like that but using EOS instead of ENET. |
Doing it this way will it support Godot's networking functions like rpc, rpc_id, etc |
Yes thats my understanding. e.g. once you implemented those two classes, you would write something like this in GDScript
and then all the other multiplayer stuff @rpc, etc would just "work". Obviously you have all the EOS lobby stuff first which the clients get the host socket id from. |
yes that is the purpose of the transport layer this some examples of transport layers EOS made for unity |
I forked the repo and am currently working on implementing the p2p interface. My fork is here: https://github.com/LowFire/epic-online-services-godot I've made some pretty good progress so far. Still trying to work some things out and am writing unit and integration tests for it. |
Thanks for the contribution! Hoping to see great progress. |
Closing since merged #13 |
when do you think we will have p2p
thank you for the great work
The text was updated successfully, but these errors were encountered: