Skip to content

A Godot MultiplayerPeer implementation using Steam networking written in C#

License

Notifications You must be signed in to change notification settings

craethke/steam-multiplayer-peer-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SteamMultiplayerPeer for C#

This is an implementation of Godot's MultiplayerPeer (used by the high-level multiplayer API) using Steam for the underlying networking.

To use:

    private const int VIRTUAL_PORT = 0;

    public void CreateServer() {
        var multiplayerPeer = new SteamMultiplayerPeer();
        var error = multiplayerPeer.CreateServer(VIRTUAL_PORT);

        if (error != Error.Ok) {
            GD.PrintErr("Error creating host: ", error);
            return;
        }

        Multiplayer.MultiplayerPeer = multiplayerPeer;
    }

    public void CreateClient(ulong steamId) {
        var multiplayerPeer = new SteamMultiplayerPeer();
        var error = multiplayerPeer.CreateClient(steamId, VIRTUAL_PORT);

        if (error != Error.Ok) {
            GD.PrintErr("Error creating client: ", error);
            return;
        }

        Multiplayer.MultiplayerPeer = multiplayerPeer;
    }

Known issues

  • Configuration flags are not yet fully implemented
  • Channels are not implemented

See also:

About

A Godot MultiplayerPeer implementation using Steam networking written in C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages