greenworks icon indicating copy to clipboard operation
greenworks copied to clipboard

Updated Readme Help

Open framerate opened this issue 4 years ago • 6 comments

Hey guys!

I've spent the last 3 days trying to get the basics of my app running with Steam Overlay support and hit a bunch of headaches. I'd like to help fix them but I could use someone to help me. Some things I'd like to solve:

  • [ ] I have no idea which version of the Steam SDK is compatible with greenworks. It would seem 1.42, but there are docs on the repo that state 1.41. Plus if we direct users to "download from steamworks" we'll get 1.44 (I believe).
  • [ ] The Electron docs (here https://github.com/greenheartgames/greenworks/blob/master/docs/build-instructions-electron.md) do not work. You get electron 8 and the command line flags just cause the window to not open
  • [ ] The documentation points to github "releases" page which hasn't been updated since 2018. Through random issues I found the "prebuilt binaries" website that contains a bunch of newer ones (great resource there guys, love it!)

There is more but it's hard for me to know for sure since I'm constantly trying different things just to get the basics setup.

Can anyone point me getting a raw electron sample running so I can verify the overlay and then re-write the readme for a PR?

What version of Electron? What Command Flags? What Version of Steam SDK? Does electron-builder version matter?

Hopefully I can get this running ASAP and do a write up for the next guy. Thanks!

framerate avatar Mar 29 '20 20:03 framerate

Also I realize it's possible "The overlay just doesn't work with Electron". There's a lot of discussion on this all over the issue tracker. But it seems maybe the canvas fix will work for some of you? Any help is appreciated <3

framerate avatar Mar 29 '20 20:03 framerate

You can use the latest Steam SDK version with the automated builds provided here: https://greenworks-prebuilds.armaldio.xyz/

Regarding the overlay and electron (latest), our current experience is:

  • It only works in Windows
  • It only works with the command line switches --in-process-gpu --disable-direct-composition
  • It sometimes, but rarely works in dev builds. It seems to work fine when running via Steam though.
  • Sometimes it only attaches to certain windows, and sometimes only after the window has been resized or moved.
  • The canvas hack isn't necessarily required. The important thing is making sure the whole window is being repainted while the overlay is active. So far we've found that detecting when the overlay is opened and adding a BrowserView on top of the current window which consists of an animating (slight change of opacity) full page div works fine.

Hope this helps a bit.

Morthy avatar Apr 07 '20 16:04 Morthy

To add onto what @Morthy said: I am successfully using the latest Steamworks SDK v1.48a with Electron v8.2.4 and the latest greenworks prebuilt binaries from https://greenworks-prebuilds.armaldio.xyz. Being able to use the latest Steamworks SDK is great because the Mac notarization issue was fixed. The overlay still only works on Windows (--in-process-gpu switch is required but I didn't need --disable-direct-composition), but everything else seems to be working fine on both Windows and OSX. I haven't gotten a chance to test a Linux build yet.

I know finding helpful info about this is frustratingly difficult so I thought I'd share some good news.

SamDelgado avatar Apr 30 '20 18:04 SamDelgado

This is great news! I'm circling back to this this week so maybe we can upgrade our electron. I know @invader444 will be pleased!

framerate avatar Apr 30 '20 19:04 framerate

This is great news! I'm circling back to this this week so maybe we can upgrade our electron. I know @Invader444 will be pleased!

Update all the things! 🤪

Invader444 avatar May 01 '20 00:05 Invader444

As Morthy said, you can use a fullscreen animation to force Chrome to render at 30/60fps. I found it easier to call https://www.electronjs.org/docs/api/web-contents#contentsinvalidate 30 times a second. Obviously might have some affect on performance, nothing noticeable so far though.

webContents.invalidate() combined with these flags: app.commandLine.appendSwitch("in-process-gpu"); app.commandLine.appendSwitch("disable-direct-composition"); app.commandLine.appendSwitch("disable-transparency"); got it working on Windows for me. Still no luck for MacOS though :( Can only assume its a Steam issue at this point and not Electron.

Rosslington avatar May 04 '20 10:05 Rosslington