YoYoGames / GMEXT-Steamworks

Repository for GameMaker's Steamworks Extension
Other
65 stars 12 forks source link

Add use of Channels for sending and receiving network packets #64

Closed TheoryGeorgiou closed 5 months ago

TheoryGeorgiou commented 6 months ago

This is already a feature in the Steam API and would mean minor modification to simply add the optional nChannel parameter to the steam_net_packet_receive() and steam_net_packet_send() extension functions.

Currently without the parameter all packets are sent through channel 0 and are consumed by the first instance of a game not allowing sequent instances to receive the packet this makes testing on a single computer and steam account impossible.

Adding the nChannel parameter would allow a channel to be designated for each open game client allowing easier testing. This would also add support for instances networking, such as using deferent channel per room.

Here is a link to the steam docs referencing the nChannel https://partner.steamgames.com/doc/api/ISteamNetworking

TheoryGeorgiou commented 6 months ago

@iampremo @jzavala-YYG I have done my best to resolve this issue using a fork. Here is the pull request though I am not a C++ dev but it does work and is optional change that will not effect existing users of the extension upon update.

Here is the PR: https://github.com/YoYoGames/GMEXT-Steamworks/pull/65

Thankyou game maker team for making this extension!

jzavala-YYG commented 5 months ago

"Merged" in this commit: ad7af527a644a6ca2dbdef50ebe5f440ad01b453

YYBartT commented 2 months ago

Updated the documentation in the source repo and updated the wiki as well.