YAL-Game-Tools / Steam-P2P-Adapter

Allows to play games without Steam P2P API integration via Steam [to avoid port forwarding]
19 stars 1 forks source link

Steam P2P adapter (working title)

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.

How does it work

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).

How to use

Limitations and caveats

Command-line arguments

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:

Compiling

First-time setup:

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.