Ever try playing a videogame on Steam with your friend only to realize that you cannot because the game doesn't implement Steam networking/matchmaking and neither of you can port forward due to being behind a few too many layers of NAT? This tool solves that specific problem.
The premise is simple enough:
A game with "direct" (IP-port connections) works like this (very simplified):
Game 1 ⇄ The Internet ⇄ Game 2
A game that implements Steamworks P2P networking works like this:
Game 1 ⇄ Steam client 1 ⇄ The Internet ⇄ Steam client 2 ⇄ Game 2
This tool acts as an intermediary:
Game 1 ⇄ Tool 1 ⇄ Steam client 1 ⇄ The internet ⇄ Steam client 2 ⇄ Tool 2 ⇄ Game 2
So that:
This way, you can avoid port forwarding so long as Steam can establish a P2P connection (which is in most cases since Valve had almost two decades to deal with NAT traversal issues).
steam_appid.txt
on both ends and run the tool.480
for SDK demo app)
since free apps do not have the matchmaking API enabled by default.127.0.0.1
if hosted on the same machine)
and port (determined by the game).127.0.0.1
if connecting from the same machine) and port.
If the game does not prompt to enter a port when connecting, make sure to use the port that the game expects the server to be running on!You may run the tool from CLI (Command Prompt or PowerShell on Windows, Terminal on Mac/Linux, etc.) to avoid having to re-enter details every time you run the tool. Supported arguments are as following:
--server
: Automatically enters server mode--client
: Automatically enters client mode--tcp
: Automatically uses TCP protocol--udp
: Automatically uses UDP protocol--host <ip>
: Uses the specified IP address to host on/connect to (e.g. --host 127.0.0.1
)--port <number>
: Uses the specified IP address to host on/connect to (e.g. --port 5394
)First-time setup:
haxelib install hxcpp
haxelib git SteamWrap https://github.com/YAL-Forks/SteamWrap
setup.bat
(Windows) or setup.sh
(Mac, Linux) in SteamWrap's directory.Then:
haxe -debug -lib SteamWrap -cp src -cpp bin -main Main
When making a build, don't forget to copy the appropriate steamwrap.ndll
into the ZIP.