/FizzySteamworks

A transport for Mirror using Steam / Steamworks.NET

Primary LanguageC#OtherNOASSERTION

FizzySteamworks

This is a community maintained repo forked from RayStorm.

Mirror docs and the official community Discord.

FizzySteamworks brings together Steam and Mirror . It supports both the old SteamNetworking and the new SteamSockets.

NOTE Steamworks.NET has a known issue preventing the use of the new SteamSockets and can only be used if you have implamented Steamworks.NET change set 424 or are using Heathen's Steamworks; if either case is true you will need to uncomment code located in the NextCommon.cs in the ProcessMessage method for the Steam Sockets integration to work

Dependencies

If you are using Heathen's Steamworks Foundation or Steamworks Complete you do not need to install Steamworks.NET as they already have it included.

You must have Mirror installed and working before you can use this transport. Mirror FizzySteamworks is also obviously dependant on Mirror which is a streamline, bug fixed, maintained version of UNET for Unity.

You must also have installed and working either Steamworks.NET FizzySteamworks relies on Steamworks.NET to communicate with the Steamworks API. Requires .Net 4.x

or

Heathen's free Steamworks Foundation or Heathen's premimum Steamworks Complete NOTE: Heathen's Steamworks is built on and includes Steamworks.NET so if you already have that installed you must fully remove it first

Setting Up

  1. Install Mirror (Requires Mirror 35.0+) from the Unity asset store Download Mirror.
  2. Install FizzySteamworks unitypackage from the release section.
  3. In your "NetworkManager" object replace "Telepathy" script with "FizzySteamworks" script.

Host

To be able to have your game working you need to make sure you have Steam running in the background and that the Steam API initalized correctly. You can then call StartHost and use Mirror as you normally would.

Client

To connect a client to a host or server you need the CSteamID of the target you wish to connect to this is used in place of IP/Port. If your creating a Peer to Peer architecture then you would use the CSteamID of the host, this is Steam user ID as a ulong value. If you are creating a Client Server architecture then you will be using the CSteamID issued to the Steam Game Server when it logs the Steam API on. This is an advanced use case supported by Heathen's Steamworks but requires additional custom code if your using Steamworks.NET directly.

  1. Send the game to your buddy.
  2. Your buddy needs the host or game server steamID64 to be able to connect.
  3. Place the steamID64 into "localhost" then click "Client"
  4. Then they will be connected to your server be that your machine as a P2P connection or yoru Steam Game Server as a Client Server connection.

Testing your game locally

You cant connect to yourself locally while using FizzySteamworks since it's using Steams Networking which runs over Steam Client and addresses its connection based on the unique CSteamID of each actor. If you want to test your game locally you'll have to use "Telepathy Transport" instead of "FizzySteamworks".