3ddelano / epic-online-services-godot

Unofficial Epic Online Services wrapper for Godot Engine 4.2 (EOSG) (includes demo project)
MIT License
174 stars 12 forks source link

Implement P2P Interface #13

Closed LowFire closed 1 year ago

LowFire commented 1 year ago

In this pull request, I've implemented the P2P interface. IEOS has new methods that interact with the P2P interface so that it's features can be accessed by the rest of the plugin. Two new classes have been introduced; EOSGMultiplayerPeer and EOSGPacketPeerMediator. Both these classes use the p2p interface to send and receive packets, send and accept connection requests to and from remote peers, and receive notifications from the P2P interface. Users can now establish direct peer-to-peer connections with other peers over the internet by creating instances of EOSGMultiplayerPeer and creating either a server, client, or mesh instance.

Here are a list of changes and features in this pull request.

IEOS:

EOSGMultiplayerPeer:

EOSGPacketPeerMediator:

Other Changes:

Bug Fixes:

3ddelano commented 1 year ago

This looks great. Thanks for your contribution.

3ddelano commented 1 year ago

It would be nice to have a minimal example using this P2P interface. If you like you can work on that too.

LowFire commented 1 year ago

It would be nice to have a minimal example using this P2P interface. If you like you can work on that too.

I did make a simple test game that puts it into action. It's a separate Godot project though. If you want, I could add that to the repo and have that be the sample. If not, and you want something that's part of the samples project instead, then I could probably work on that at some point.

3ddelano commented 1 year ago

Oh it would be good to link to that project if possible in the readme.

LowFire commented 1 year ago

Sure thing. I can go ahead and make a repo for it and have a link to it in the readme.