Open emanuelmaues opened 9 years ago
@emanuelmaues Could you provide more details about it?
@hokein What do you need to know? My node-webkit version is 0.11.2. My greenworks version is the last one.
Do you have a small reproducible example? Also, what platform are you testing on?
@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 } }
Same here! Steam Overlay doesn't appear.
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
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.
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,
@hokein @patrickklug Can you explain what you mean by refreshing? Can't seam to get the overlay working on any OS so far.
@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.
@morgondag
I wonder if you could share with us a simple example if finally you get working. Thanks!
@Legrandk yes that would be nice, please do. send me a gist or kim@morgondag.nu
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
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! :)
I've tested the example and it didn't work here. :/
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?
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.
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.
@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.
@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 :(
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 oh you meant building the greenworks code? sorry, didn't get that. i'll try that next. thanks for the reply.
@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 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 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
@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.
--in-process-gpu works for me on windows with the released build and crashes horribly on mac.
@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.
@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.
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?
@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.
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
@riadd sorry, no updates at the moment. I didn't have time to investigate this properly but what you described on Linux happens to me as well :( @janpetersen Good point - I didn't get Steam overlay working in any of the Steam games I tried. To be honest, they usually don't even launch. I'm on Fedora and I don't think developers bother to support other systems than Ubuntu.
@janpetersen steam overlay in Ubuntu works in general for me. Not for my game though :/
I suppose the overlay-failed-on-linux issue is probably not related to Greenworks. It is also a known issue in Steam Client, see ValveSoftware/steam-for-linux#3093
@amongpixels not sure if related, but maybe interesting to you: #22
going to try to make a 32-bit build and see if that crash on mac as well. just testing random stuff right about now.
For me the overlay worked on Mac without any flags, not even --in-process-gpu. I was super surprised but didn't think much of it, just glad I didn't have to go through similar pains as with the Linux build ;D I've been using nw 12.1 and built my own greenworks from latest version. The OS I tested was Yosemite and Mavericks.
alright will try the pain to build the source myself then. this means you need to build on a windows machine for the windows version as well? and on mac for the mac version?
Yes, but... here's a folder with compiled versions of greenworks I did for various nw versions (and electron too). Mind you, only 0.12.1 contains builds for all platforms and architectures. Try it out if you can't be bothered with compiling (although it's not as bad as it sounds, nw-gyp makes it pretty easy).
https://www.dropbox.com/sh/9x2x1fqtw0pa9c5/AAA3DKRY7wsNNeL0epayS7wha?dl=0
@amongpixels thank you a lot! Will give this a spin and see if the overlay works!
Unfortunately having this same issue on Mac OS X (10.10.3). Have tried all the combinations of workarounds, chromium arg/switches, building greenworks manually, etc. Currently using the newest Electron. I see people have got the Mac version working with NW.js, so maybe it's an Electron thing? Considering it's not technically supported, I would assume that is the case.
tried @amongpixels version of greenworks with nw 0.12.2 ( 0.12.1 is not available) that seam to not work at all. Steam is not started but greenwork init method returns true.
What is the combination of steam sdk + greenworks + nws version that the overlay actually work on mac? Anybody know?
Update to what I said previously. We switched tracks from Electron and tried the latest NW.js like @morgondag
Unable to get the overlay at all on OS X (tried all workarounds). Both latest NW.js/Electron. Can we re-open?
Edit: Also, I just confirmed that 0.12.1 does indeed work. I can't seem to figure out what changed that would disable the overlay from functioning. For now, I'm assuming this is an Electron/NW.js thing, and not Greenworks.
Some updates:
From the 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.
The overlay feature is only available in the game launched via Steam Client. So if we launch the game from ourselves, it won't work. I have create a sample app(https://gist.github.com/hokein/5684615543bf7718c2d7), which works on NW.js v0.12.1(Need to put the Greenworks libraries in the sample directory before running).
I just reopen for discussion.
I haven't been able to get the overlay working either - but haven't tried launching from steam yet. I'll do the build and test again. [Working when launched with steam client]
One question though - is it possible to test whether the player has launched the game from steam or not? It would be good if the app was aware about whether they launched directly, to deal with missing functionality.
@bgSosh
is it possible to test whether the player has launched the game from steam or not?
It depends on Steam SDK API. If Steam SDK provides such API, then yes, we can implement in Greenworks.
Nice! I'm looking forward for a new build to test. @hokein, could you please check the pull request #47 and provide updated release files?
Whoops, I referenced the wrong issue. I meant for this patch to fix issue https://github.com/greenheartgames/greenworks/issues/45
Hi guys,
For some reason I cannot get it work neither on Windows 8.1, nor on OS X 10.10.5. I am launching it from Steam-Client(I click on the Start-Button), using NW.js 0.12.1 (32-Bit on Windows, 64-Bit on OS X), latest Steam SDK, I tried with —in-process-gpu(not working on OS X - white screen), tried the force-screen-refresh stuff, tried building greenworks from source, but nothing helps. Am I the only one which these problems? (T_T) (It seems it works for all other people here now)
Even that example(https://gist.github.com/hokein/5684615543bf7718c2d7) is not working for me. The greenworks.isOverlayEnabled method always returns false. Shift+Tab does nothing and activateGameOverlay also just does nothing, it will not crash it just does nothing. (initAPI() returns true)
Hmm sometimes I have the feeling that I missed something since I am new to Steam. Do I need to configure something on Steam side before the overlay can work for my app?(Special Launch-Option or something?) I actually don’t develop a game but an application. So there is actually no render-loop or something but I thought that the „force-screen-refresh“ stuff will fix exactly that problem.
I also checked if the Steam-Overlay is enabled in the app properties and in the steam settings. Any ideas what I could check else?
I actually don’t think that it is directly related to greenworks because even if I compile an own nw.js addon with nw-gyp and calling the Steam-API directly from C++ (like SteamFriends()->ActivateGameOverlay) it does exactly the same: Nothing. I have the feeling that maybe the Steam-Overlay cannot hook in for some reason....
Try to use the 32bit nwjs with precompiled Greenworks module.
To test, you could download "Anno Online" from the Steam store. It uses nwjs 0.12.3 with precompiled Greenworks.
--in-process-gpu use this
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?