-
Notifications
You must be signed in to change notification settings - Fork 155
Troubleshooting
That means you didn't copy this file to your app directory and it can't link it at runtime.
Your steam client should be running (or you can copy the steamclient dynamic library into your app directory).
Steam can't determine for which steam application you are trying to initialise the API. Either launch the game from Steam, or put the file steam_appid.txt
containing the correct appID in your app folder. steam_appid.txt should contain just your application id, nothing else.
If initAPI is returning false, even when the above are correct, one possibility is that the steam client is running with administrator privileges, but the app is not. Try running the app as administrator (right click, and 'run as administrator')
This indicated your Steam account is limited, missing some features of Steam. You need to do one of the following things to access all Steam features:
- Purchase a game for Steam store
- Redeem a Steam gift
- Complete a microtransaction
For more details, please refer to Steam support.
In order for the Steam Overlay (activated by "Shift + Tab" by default) to work properly, you need to have your Node-Webkit draw every frame. Normally, the browser won't redraw every frame when it's idle.
One possible solution to this would be, to insert a small 1x1 pixel canvas element, which you update in every frame. Example:
<html>
<head>
<script>
function forceRefresh() {
var canvas = document.getElementById("forceRefreshCanvas");
var ctx = canvas.getContext("2d");
ctx.clearRect(0, 0, canvas.width, canvas.height);
window.requestAnimationFrame(forceRefresh);
}
</script>
<body onload="forceRefresh();">
<canvas id="forceRefreshCanvas" width="1" height="1"></canvas>
</body>
</html>
Now Node-Webkit will redraw every frame at the current refresh rate (in most cases 60 fps). This hack might not be necessary for game using WebGL because a canvas is probably already refreshed every frame for rendering.
Notice: In the latest electron versions, it might be required that the canvas fills the whole screen (Otherwise only the part of the window where the canvas is located in will get redrawn, and thus the overlay will flicker / look buggy). It is fine to put it in the page background though, for example with:
#steamOverlayCanvasFix {
position: fixed;
top: 0px;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
opacity: 0.01;
pointer-events: none;
z-index: -1;
}
If this doesn't seem to work, try adding the chromium flag --in-process-gpu
to your package.json as well. In case your window just stays blank, it might be required to also add --disable-direct-composition
.
If the overlay appears strange, like other background windows are mixing with it try to remove the transparent flag in windows property of package json.
"window": {
"toolbar": false,
"fullscreen": true,
"frame": false,
//"transparent": true, // now should work correctly
"no-edit-menu" : true
},
Note:
From the Steam game_overlay document:
The game doesn't need to do anything to have the overlay work, it automatically hooks in for any game launched via Steam. Why isn't the Steam overlay showing up in my app? See requirements. If you do meet the requirements and it's still not showing up, make sure you're launching the app from the Steam client.
You need to launch the game via Steam Client Application to enable the game overlay feature.
Feel free to update this Wiki if you find a better solution.