greenworks icon indicating copy to clipboard operation
greenworks copied to clipboard

Steam Overlay doesn't work with me

Open emanuelmaues opened this issue 10 years ago • 58 comments

Hello guys, I need help to make Steam Overlay work. I have checked multiple solutions across the web and still can't get it to show in my game (tried a lot of different chromium args). I already managed to start the Steamworks API but Steam Overlay still doesn't work. Could you help me?

emanuelmaues avatar Feb 12 '15 19:02 emanuelmaues

@emanuelmaues Could you provide more details about it?

hokein avatar Feb 13 '15 01:02 hokein

@hokein What do you need to know? My node-webkit version is 0.11.2. My greenworks version is the last one.

emanuelmaues avatar Feb 13 '15 04:02 emanuelmaues

Do you have a small reproducible example? Also, what platform are you testing on?

patrickklug avatar Feb 13 '15 05:02 patrickklug

@patrickklug I'm using Windows 8.1 64 bits. I don't know what kind of example I can provide, here's my package.json:

{ "name": "Test", "main": "index.html", "nodejs": true, "version": "0.8", "chromium-args": "--in-process-gpu", "window": { "icon": "logo.png", "fullscreen": true, "resizable": false, "toolbar": false } }

emanuelmaues avatar Feb 13 '15 21:02 emanuelmaues

Same here! Steam Overlay doesn't appear.

  • System: OSX 10.10
  • NodeWebkit: 0.11.6
  • SteamSDK: 1.30
  • Greenworks: 0.4.0

index.html:

<html>
<head>
  <meta charset="utf-8">
  <title>Hello Greenworks</title>
</head>

<body>
  <h1>Greenworks Test</h1>
    node-webkit version: <i><script>document.write(process.versions['node-webkit'])</script></i>.</br>
    node.js version: <i><script>document.write(process.version)</script></i>.</br>

  SteamAPI Init:
  <script>
    var greenworks = require('./greenworks');
    document.write(greenworks.initAPI());  // this works

    //option String: valid options are Friends, Community, Players, Settings, OfficialGameGroup, Stats and Achievements.
    greenworks.activateGameOverlay("Friends");

    document.write(" Overlay?: " + greenworks.isGameOverlayEnabled() ); // returns always FALSE
  </script>
</body>

package.json:

{
  "name": "greenworks-nw-demo",
  "main": "index.html"
}

Legrandk avatar Feb 24 '15 16:02 Legrandk

@Legrandk The overlay APIs do work. The sample you provided is find except you need to refresh screens in certain intervals, refer #2 for more details.

hokein avatar Feb 25 '15 02:02 hokein

Hey @Hokein,

I've been reading #2 and I still not get the point about "refresh the screen". You mean the whole NodeWebKit Window? The inside Chrome window element? Canvas element? Sorry but I'm confused.

So, I've written a very simple test in order to help clarify:

<html>
<head>
  <meta charset="utf-8">
  <title>Hello Greenworks</title>
  <script>
    var greenworks = require('./greenworks');
    console.log( "Steam initAPI: ", greenworks.initAPI() );
    console.log("node-webkit version: ", process.versions['node-webkit'] );
    console.log("node.js version: ", process.version );

    greenworks.activateGameOverlay("Friends");

    var radius = 100;
    var angle = Math.PI/2;

    function drawLoop() {
       // it only draws a ping-pong rectagle.
      console.log("drawLoop");

      var canvas = document.getElementById("game");
      var ctx = canvas.getContext("2d");

      ctx.clearRect(0, 0, canvas.width, canvas.height);

      ctx.strokeRect( (canvas.width-50)*0.5 + Math.cos(angle) * radius, (canvas.height-50)*0.5, 50, 50);
      angle += 0.01;

      window.requestAnimationFrame( drawLoop );
    }
  </script>
</head>

<body onload="drawLoop();">
<canvas id="game" width="640" height="400"></canvas>
</body>
</html>

Thanks,

Legrandk avatar Feb 25 '15 11:02 Legrandk

@hokein @patrickklug Can you explain what you mean by refreshing? Can't seam to get the overlay working on any OS so far.

morgondag avatar Mar 12 '15 16:03 morgondag

@morgondag you can just have a 1x1 canvas which you repaint every frame but from what I can see you are already drawing every frame.

Unfortunately I don't know what the problem is with your test. If you are sure that the greenworks API itself is working (steam init works etc.) then I'd suggest you contact your Valve tech representative.

patrickklug avatar Mar 13 '15 02:03 patrickklug

@morgondag

I wonder if you could share with us a simple example if finally you get working. Thanks!

Legrandk avatar Mar 13 '15 08:03 Legrandk

@Legrandk yes that would be nice, please do. send me a gist or [email protected] Got the Greenworks.ugcShowOverlay working. but when I call greenworks.activateGameOverlay node-webkit crashed to the ground on both mac and windows. When running though steam

morgondag avatar Mar 13 '15 12:03 morgondag

I was facing the exact same problem, but I finally got it working.

I updated the Wiki page "Troubleshooting". Please take a look at https://github.com/greenheartgames/greenworks/wiki/Troubleshooting#steam-overlay-is-unresponsive--frozen, there you will find an example.

I hope it works four you, too! :)

janpetersen avatar Mar 13 '15 16:03 janpetersen

I've tested the example and it didn't work here. :/

emanuelmaues avatar Mar 13 '15 18:03 emanuelmaues

the example seams to behave the same, auto close or crash nw instance. Can it be something with the steam api? are your games published and active on or in a pre released state? Can that have anything do with it? What steam sdk and node-webkit versions are you guys testing this on?

morgondag avatar Mar 13 '15 20:03 morgondag

I think these are unrelated issues. The issues you folks seem to be facing is that the steam overlay doesn't appear at all, while the solution @janpetersen (thanks for updating the wiki btw) is for stuttering/unresponsiveness.

patrickklug avatar Mar 13 '15 22:03 patrickklug

Hello guys, I've managed to make steam overlay work. I had to built the code myself and send throught Steam Pipe to actually see it working. When I used the release version it wouldn't work. Hope it helps anyone.

emanuelmaues avatar Mar 20 '15 19:03 emanuelmaues

@morgondag unfortunately i'm still facing this problem. did you find a solution? i tried the --in-process-gpu stuff and also have a running draw loop. shift+tab does nothing. forcing the overlay through running "greenworks.activateGameOverlay('friends')" crashes the browser.

riadd avatar Apr 28 '15 20:04 riadd

@emanuelmaues not sure i'm understanding you correctly. so running it locally still doesn't work, but playing the downloaded version from steam works with the overlay? unfortunately neither versions work for me so far :(

riadd avatar Apr 28 '15 20:04 riadd

When I uploaded it to Steam, it worked. I don't know why honestly.

Bear in mind that it worked when I built the code from scratch. It didn't work when I used the release version.

emanuelmaues avatar Apr 28 '15 22:04 emanuelmaues

@emanuelmaues oh you meant building the greenworks code? sorry, didn't get that. i'll try that next. thanks for the reply.

riadd avatar Apr 28 '15 22:04 riadd

@riadd Any luck? Does your game use 2d canvas or WebGL? I have the same problem with pure WebGL game (shift + tab does nothing) and was wondering if the issue is specific to WebGL.

BTW. Does anyone now if notifications (in right bottom) for achievements/messages are rendered on overlay as well? These show fine in my game, it's just the overlay itself that doesn't work.

Thanks!

amongpixels avatar May 02 '15 22:05 amongpixels

@amongpixels My game is completely canvas based. Sorry, forgot to write that it is actually working for me now. Same as for @emanuelmaues it works when I build greenworks from source and run it in steam. Starting it locally still doesn't work, but it's good enough for me as it is now.

riadd avatar May 02 '15 22:05 riadd

@riadd Thanks for quick reply! I'll try building it myself too. It seems odd how it affects the overlay but if it works for both of you... :D

amongpixels avatar May 02 '15 22:05 amongpixels

@riadd (and for future generations) I got the overlay to work - I did two things: recompiled greenworks for nw myself and added --in-process-gpu to chromium flags - hard to tell which one actually did the trick D: Phew, for a minute I was having serious second thoughts about the choice of technology for my game.

amongpixels avatar May 03 '15 12:05 amongpixels

--in-process-gpu works for me on windows with the released build and crashes horribly on mac.

morgondag avatar May 03 '15 19:05 morgondag

@amongpixels I too was worried for a moment ;) I tried the --in-process-gpu stuff before, but the overlay only started working after building from source.

riadd avatar May 03 '15 20:05 riadd

@morgondag I didn't have a chance to test on Mac yet but it does crash my Linux build ;/ That looks to me like a problem with chromium/nw.js. I'll be investigating this soon, hopefully it's solvable, will keep you posted if I find anything.

amongpixels avatar May 03 '15 20:05 amongpixels

Would be helpful if you could post your compiled version, so others can try it. - Is there anything different in your setup? Do you use the same Steamworks API version etc?

patrickklug avatar May 03 '15 23:05 patrickklug

@amongpixels any updates from your side? i actually also ran into some problems with linux. the --in-process-gpu flags crash the Linux version on start-up. Without it, it launches, but then I'm not able to open the overlay anymore via tab+shift. when i try to open the overlay via code, it crashes.

riadd avatar May 10 '15 22:05 riadd

I'm not able to open the Steam Overlay on Linux in any games. This seems to be a general Steam issue on Linux, at least for me.

Does your Steam overlay work in other games?

If it helps, these are my chromium flags for Linux:

--ignore-gpu-blacklist --enable-webgl --disable-transparency --disable-device-orientation --disable-setuid-sandbox --ppapi-flash-path=plugins/libpepflashplayer.so --ppapi-flash-version=17.0.0.169

janpetersen avatar May 11 '15 09:05 janpetersen