Jump to content

Steamworks::Initialize() Doesn't Work If Steam Started Second


gamecreator
 Share

Recommended Posts

If I start Steam before I launch my program, Steamworks::Initialize() will work fine and return true. But if I start the program, then start Steam, then call Steamworks::Initialize(), it will always return false (even if I keep calling it in a loop). Is this a known limitation?

 

It would be nice to be able to ask the user to hop on Steam from inside the game as opposed to forcing them to quit the program and restart it after Steam. But maybe I'm doing something wrong.

 

   //  If we haven't connected to Steam yet
   if(gamestate==0)
   {
       context->DrawText("Start Steam to continue", 10, 10);

       //  If we've connected to Steam, go to next phase: having friends connect
       if(Steamworks::Initialize()) gamestate=1;
       else
       {
           printf("initialize fail\n");
           Sleep(500);  //  Wait a bit between attempts to initialize Steam
       }
   }

 

(The Steam Overlay doesn't come up either.)

Link to comment
Share on other sites

A published game can only start with Steam, so I don't think this is a problem. The shortcuts Steam creates on your desktop start Steam with a command line parameter to launch your app.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I don't understand. My Run! Jump! Climb! game didn't require Steam but it was published, right?

Along those lines, I am hoping that the beta version that has Steam being initialized whether or not its actually in your main.lua script is not something that will be permanent. In the standard main lua script, it is commented as 'optional' and right now its not.

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

I don't understand. My Run! Jump! Climb! game didn't require Steam but it was published, right?

I mean a game published on Steam.

 

Along those lines, I am hoping that the beta version that has Steam being initialized whether or not its actually in your main.lua script is not something that will be permanent. In the standard main lua script, it is commented as 'optional' and right now its not.

When you run your game from the editor, Steam is always initialized already, actually, since the process is a child of the editor. Any child process is just enabled by default.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I mean a game published on Steam.

Which is a game that's already Greenlit, right (has a Steam ID)? I imagine multiplayer concepts and multiplayer games put up to be Greenlit (and just to the Leadwerks Standalone Games page) would still have this issue. And I 100% get that there aren't millions of Leadwerks users working on multiplayer games, specifically for Steam. Just something awkward I came across to bring to your attention. I have no idea if fixing it is easy or impossible. Thanks for listening.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...