multiplayer-community-contributions icon indicating copy to clipboard operation
multiplayer-community-contributions copied to clipboard

[Steamworks] Steam Networking Sockets

Open trungdeveloper199 opened this issue 5 years ago • 8 comments
trafficstars

Hi, Old P2P in Steamworks will be removed soon and will be replaced with Steam Networking Sockets. Please let me know! Steamworks transport is using steam networking sockets? if not, can you update with SteamNetworkingSockets? or anyone has this function please share this with me. Thank you

trungdeveloper199 avatar Oct 24 '20 03:10 trungdeveloper199

I believe that best alternative sockets is facepunch.steamworks, it would be great to have it as transport. I intend to link these two libs but my network level is still low :(.

scriptsengineer avatar Dec 21 '20 12:12 scriptsengineer

@trungdeveloper199 where do you find the announcement that P2P will be removed? But yea, if this can be updated (Steam transport seems not being updated for a long while), that will be great!

furic avatar Jan 13 '21 02:01 furic

@trungdeveloper199 where do you find the announcement that P2P will be removed? But yea, if this can be updated (Steam transport seems not being updated for a long while), that will be great!

you can find it at the first lines of document. https://partner.steamgames.com/doc/api/ISteamNetworking it will be replaced with SteamNetworkingSockets.

"NOTE: This API is deprecated and may be removed in a future Steamworks SDK release. Please use ISteamNetworkingSockets or ISteamNetworkingMessages instead. See the Steam Networking overview for more information."

trungdeveloper1993 avatar Jan 13 '21 03:01 trungdeveloper1993

Thanks @trungdeveloper1993, have you ever got Steam P2P working by the way? I've been trying that out in last couple days but still no luck. We got the Steam ID already and it should work as told in document.

It works fine on the previous version of MLAPI. but now, I don't know :3, I'm working with Unet before change to Steamworks

trungdeveloper1993 avatar Jan 14 '21 01:01 trungdeveloper1993

We currently don't have the resources to implement transport for other steam versions than Steamworks.Net but contributions for a Steam Networking Sockets transport are welcome.

LukeStampfli avatar Apr 23 '21 13:04 LukeStampfli

I'm most of the way through writing a Steam Networking Sockets transport with the latest version of Steamworks.NET. Related issue: https://github.com/Unity-Technologies/mlapi-community-contributions/issues/76

I'm blocked on the Steamworks.NET side by this issue. https://github.com/rlabrecque/Steamworks.NET/issues/424

I'm now going to try Facepunch as they seem to have solved the issue.

fghl avatar Jun 04 '21 00:06 fghl

Facepunch was a no-go.

Steamworks.NET segfault bug was fixed. I'm now just working through some MLAPI errors.

If anyone knows about MLAPI internals and can review these errors that would be much appreciated: https://github.com/Unity-Technologies/mlapi-community-contributions/issues/77

fghl avatar Jun 06 '21 23:06 fghl

We just did an update of SteamP2P transport MLAPI / NetCode to bring it compatable with Steamwroks.NET as installed from its source.

The Mirror transport which we also collaborate on already supports both the classic SteamNetworking and the newer SteamNetworkignSockets APIs you should be able to use it + the new NetCode SteamNetworking transport to get what you need.

Would be happy to help out but dont have the bandwidth to do it our selves from scratch

Here is the Mirror version if you want to see how we went about SteamNetworkingSockets support with there transport ... its also Steamworks.NET compatable now so really you could just port that structure to MLAPI / NetCode and be done.

Have a look at NextCommon.cs it handles the message processing and send NextClient.cs and NextServer.cs implament NextCommon and handled connect, disconnect, etc.

If you have any questions you can reach me on our Support Discord server I am listed as Loden | Heathen Engineering there.

JamesMcGhee avatar Nov 25 '21 16:11 JamesMcGhee

We have added a pull request for a new Steam Networking Sockets transport that will resolve this see request #179

JamesMcGhee avatar Sep 05 '22 11:09 JamesMcGhee