How can I test direct Steam invite/join using Spacewar?

Here is the situation:

I have packaged my (Windows) game and deployed to two separate computers, each with their own separate Steam accounts.

My game is not Greenlit, so I am using the Steam development game: Spacewar.

All of my in-game Steam integrations are setup and working to support direct Steam invitations and session joining. However, I wanted to test these areas, but wasn’t quite sure how. Searching the web, I could find little to no information on how to do so.

If I host my game on one computer, and send in invite to my other: when the other user clicks “Join” from the Steam invitation, they are prompted to download/install Spacewar.

How do I test joining my game and not Spacewar?

I figured out a way and wanted to post it in case anyone else needs help with this.

  1. Download and install Spacewar for the user who will be joining.
  2. Find, download and install Windows Sysinternals Process Explorer. ( Process Explorer - Windows Sysinternals | Microsoft Docs )
  3. Run Process Explorer and setup a Path filter for “Spacewar”.
  4. Re-send invitation from host to the other user.
  5. While Process Explorer is running on the client, click the Steam join request and let it launch Spacewar (don’t worry about it not launching your game).
  6. Let Spacewar finish loading, then exit the game.
  7. Bring up Process Explorer and research the list. Find the first entry where it actually invokes SteamworksExample.exe
  8. Look at the Properties of the entry. The command line should show, at the end, something like: +connect_lobby 109775243872202570
  9. Setup a batch file to launch your game, and add that to your command at the end: +connect_lobby 109775243872202570
  10. Launch your game using that batch file. UE4 will then invoke the Steam join and you will be able to test out your game! (OnSessionUserInviteAccepted and OnJoinSessionCompleted should execute).

Didn’t work for me. The only real difference I notice when following the steps was my property entry read “+connect_lobby %llu”. After running the steps above I

  1. Sent an invite from the server machine, where nothing was installed or changed.
  2. I do get the invite message from steam while the game is running on the client, I accept but the client doesn’t execute OnSessionUserInviteAccepted.

Not sure what I did wrong.

“+connect_lobby %llu” doesn’t look right. It almost looks like a batch file parameter is not being set or passed in correctly. That might be the problem, or part of it.

Closer now. %llu was the issue. In this context it is looking for the STEAM_ID which I was able to get from the environment variables while spacewar was running. Replacing the %llu with the steam id gave better results!

Awesome! :slight_smile:

All working now. Just for anyone else who comes across this thread, it isnt actually the steam id that you need to use in the batch file, just use the actual number posted in jvukovich’s answer “109775243872202570”.

Also be sure to have “bUsesPresence = true” when creating your session.