0
\$\begingroup\$

I'm trying to create a game with multiplayer in mind. I followed through with the steam documentation to try and get everything set up including making sure I have the test app ID 480 set in my project, but when I try to run the game... it closes my application and opens up Spacewar instead, even if I add the program to Steam externally.

My code here is written in Go but I imagine it may be the same for other languages. Could someone please explain what the issue here is?

const appId = 480

func Init() {
    if steamworks.RestartAppIfNecessary(appId) {
        os.Exit(1)
        return
    }
    if steamworks.Init() != nil {
        panic("steamworks failed")
    }
}
\$\endgroup\$
2
  • \$\begingroup\$ What exactly do you mean by using the Steam API without Steam? Are you trying to test using the Steamworks API before releasing your game is on Steam? \$\endgroup\$ Commented Feb 7 at 17:13
  • \$\begingroup\$ I'm trying to prototype with steamworks and multiplayer, the game is still in a very early stage so I'm not trying to create a steam page just yet \$\endgroup\$ Commented Feb 7 at 19:27

1 Answer 1

2
\$\begingroup\$

I can't comment due to my reputation, so I have to post this as an answer.

The app ID 480 IS the ID of Spacewar, an app used for testing (and pirating) only. As the documentation for SteamClient.RestartAppIfNecessary states

Checks if your executable was launched through Steam and relaunches it through Steam [...] Note that during development, when not launching via Steam, this might always return true.

So I would assume that unless you have your own app and app ID and can therefore launch it from Steam, it will always return true.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.