-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steamworks addon & example project: showing overlay does nothing and freezes the app window #8328
Comments
It works fine for me. Are you definitely using the latest addon version v1.2? I have no idea what could be wrong on other systems. Unfortunately this makes it infeasible to investigate unless we can identify a way to reliably reproduce it. Can you identify any information about affected systems, or find anything to change on a system that does work that causes it to stop working? Does it work if you uncheck the 'Enable overlay' property? |
I can reproduce a broken state with the following steps, it is not frozen though:
Note the window cannot be closed via the "X" button if the steam overlay is open regardless of the steps (but can be closed once the steam overlay was closed again) |
Yes i'm using last addon version 1.2: With "Enable Overlay = true" : as i describe in the report, it "freezes" the app window. By that I mean it's impossible to move or close the window. However it doesn't freeze the running C3 game, i can still press the achievement buttons for example. But the window is frozen With "Enable Overlay = false" : it pop ups seperate Steam windows, but it doesn't freeze the game window |
The report from Federico is interesting, it looks like there is 2 issues (edit: maybe 3 issues): Issue 1 affecting everyone : when the Steam Overlay is shown or supposed to be shown it's impossible to move and close the Game Window (with the "x" button") Issue 2 affecting only some windows users: the overlay isn't shown at all, but it's still impossible to move and close the Game Window. The additional issue here is that as there aren't any way to "close" the invisible Steam Overlay, it's also impossible to close the game window, It makes issue 1 even worse (Edit: in fact there is maybe even a Issue 3 according the Federico report: focus/refocusing the game window while overlay is open breaks the steam overlay : it is visible on top but is not clickable) |
Tried on 3 different computers, the same issue happens in all of them. The 3 computers I tried are Win10, Nvidia, 60hz Also several other Construct 3 users are experiencing the same issues on Discord If it helps here is the exact exported project : |
Same thing happening here. Here's my step-by-step:
Even though the game shows the overlay, the app unfocus instantly and opens the friends list in the actual Steam application. Here's a video showcasing it: Edit: I forgot to mention, I also checked on older Steamworks for Webview2 plugin and release 388-2, and the same thing happens, but only if the app is windowed. I run my game fullscreen and it seemed to work ok at first, but pressing alt + tab then coming back into the game, the overlay also broke. |
I have the same problem. The window freezes and I can't interact or close it. Steam seems to work with the plugin, like unlocking achievements, it makes a sound but it doesn't show the overlay in the corner of the screen. Showcasing it: (Win10, AMD RX6600) |
When running the application from the provided .exe file without adding it to Steam, the following problems occur:
When manually adding the .exe to Steam using "Add a game" and running it:
This issue makes WebView2 a problematic choice for Steam-based games, as it negatively impacts usability for Steam players. Even if this affects only 10% of the audience, it represents a significant portion of potential sales and user experience on the platform. Windows 10, latest c3 stable. edited for clarity. |
I tested this and exactly the same as @shotgunanaconda , both with running directly, or adding into steam and running. |
Yes the 3 computers I tried have the exact same problem as described by @shotgunanaconda @AshleyScirra given the number of C3 users experiencing the same issues, I suppose at least 1 device among all the devices from Scirra team should be able to reproduce this bug. The big issue is it makes the whole months-long work made on Windows/Linux/apple custom wrapper unusable for commercial releases right now, while it seemed that great Steam support was one of the main reason to go this way. I really hope fixing all the Steam Overlay windows issue on Webview is getting the top priority because I need to integrate a lot of Steam API features for my game for which a demo will be released in December/January and the process is completely different depending on if i go with the wrapper Steamworks companion addon or trying to implement steamworks.js for NWJS/Electron. I can't afford losing weeks on the wrong choice and it is putting me in a stressful position right now. Also the C3 community as a whole need to know where to focus its efforts, as there are currently different Steam integrations being worked on such as a Steamworks companion by Mikal or an electron steamworks.js integration by Armaldio. |
I am planning to investigate this but I would warn you such issues can be extremely difficult to deal with - it could be some graphics driver problem, or an issue with Steam itself, or be something that is difficult to track down and so takes a long time to deal with. In the mean time I would advise to uncheck "Enable overlay" - then Steam uses fallbacks like showing the actual Steam UI instead of their in-game overlay. Even with our workaround to show the in-game overlay, things like achievement notification popups can't be shown, because of the limitations of having to use such a complicated workaround for problems with the Steam Overlay - but Steam's fallback works for those and so the notification will appear. So I do wonder if it's worth dealing with such complicated workarounds if they don't even fully support all the overlay features - maybe it's just better to rely on Steam's fallback anyway. |
I can reproduce the issue with changing focus as described in this comment. It is extremely difficult to figure out why it does not work - it seems to be that the Steam Overlay is interfering with the way the app works. I don't know what it is doing as it's all undocumented and internal to Steam, and so all I can do is guess what might help. I tried a few things which didn't work before finding that WebView2 has an alternate rendering mode which seems to work better and fixes that focus problem. Perhaps it helps with other cases too. I've updated the next beta to use that mode, and I think we'll have to do more testing to identify what difference that has made to other cases. Hopefully there is a positive result, because if that doesn't work, there may not be any other good options... |
The Windows WebView2 export has been updated in r418 - please try again there and let me know how it works out. |
I'm still getting the exact same issue when exporting the Steamworks addon example project using r418, here is the exact exported projet in case it helps SteamPluginTest r418.zip |
when i type navigator.userAgent in the export game console, it returns this: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0' not sure if it helps, maybe the issue is due to different Webview2 runtimes installed on different machines ? |
I tried the new version. Sadly not fixed. a) Run .exe with steam running the background but not added to the library. Log says overlay is open, and to be honest it's acting like it is. I cant close or interactive with the application window at all. Unlike before i can now press shift+tab to close the overlay as if it was actually open. So it's calling it, but not drawing anything. b) Add game to steam library and run it. Now this is weird. I press the overlay button and it minimizes the game and opens my friendlist and the steam exe but NOT the overlay. It doesnt work pressing shift+tab to go back. I have to click on the game in the taskbar (the game is still inactive) and then press shift+tab. So it's calling steam but not the overlay. Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0' win 10, geforce 3060, latest game ready drivers. :/ |
Unfortunately the Steam Overlay workaround had too many issues that seemed infeasible to resolve (see: Scirra/Construct-bugs#8328), so it is now being removed for the time being. Steam will use fallbacks instead, such as showing the actual Steam window. The addon version is updated to v1.3.1.
With the export from this comment, I can't reproduce any issue with running the app independently. If I add it as a non-Steam game, it does weirdly show both the Steam window and the Steam overlay when showing the overlay, but otherwise it seems to work OK. I can't reproduce any of the issues around the overlay not drawing, the window freezing, or the overlay getting stuck showing with the updated export. I'm afraid I think this is the end of the road for the Steam overlay workarounds. If I can't reproduce the issue, that often is a dead-end by itself; further, even when I can reproduce an issue, the Steam Overlay is a black box - it appears to do complicated external alterations to the app which are all undocumented. I have no idea what it's doing nor what might fix it. The only relevant features in the Steamworks API are detecting when the overlay appears and disappears, and requesting to show it. There is no way to customize it. There isn't even any way to request to hide it, which limits some workaround options. The API documentation basically says if the app renders with D3D11 it should work, and browsers do render with D3D11, but it doesn't work - so even the limitations seem to be undocumented. All I can do is essentially try random things in the vague hope that it helps, and unsurprisingly, that has not led to a solution. In particular my latest effort ran in to a WebView2 bug that breaks gamepad and pointer lock, which is bad enough that we can't use that approach until that is fixed. Even if we got this particular workaround working successfully, it is still fundamentally limited by other limitations in the Steam Overlay, such as its incorrect use of alpha that mean it can't be shown transparently - that means notification popups like "Achievement unlocked" cannot be shown. So even the best case scenario if a lot of complicated stuff can be fixed will still leave it only partially supported. The only good solution is that Valve fix the overlay so it works for these cases. It would be good if everyone affected asks Valve for this, as the more people who ask, the more they'll see it's important. Meanwhile:
It's also possible future updates for WebView2 will enable a better workaround: support for rendering WebView2 to a texture should mean it renders the same way as other typical desktop games, and so support the Steam in-game overlay. So this might become possible in future. However this won't cover macOS WKWebView or Linux CEF as they use different technologies - again the best solution is for Valve to properly support it. I'd also point out neither NW.js nor Electron actually support the Steam in-game overlay out-of-the-box: both also have to use workarounds, which work for the time being, but depend on things like Chromium command-line flags that are not officially supported by Google - so those workarounds could stop working too. The only way to guarantee it works in future is for Valve to update the in-game overlay to properly support them. Given Steam has fallbacks, the rest of the integration is working fine, there are a lot of benefits to having our own desktop exporter technology, and there may be new workarounds in future, I don't think this alone merits altering our plans to move over to our own desktop exporters and ultimately phase out NW.js. So it's a shame we can't support this for now - I really have spent a great deal of time on this and already gone to great lengths to get it even to partially work at all - but I don't think there is any good way forward. I've released a v1.3.1 update for the Steamworks addon that removes the overlay workaround, so it will always use the fallbacks instead. I will keep an eye on any changes that make new workarounds possible and experiment with them in future. However for now I don't think we can take this any further, so closing this issue. If you really want support, again - please contact Valve! It's their software and they are the only ones who can actually make it work well. |
I see, I hope Valve will fix this then. As a developer of a popular game engine, it would be easier for you to convince them + you already know everything you tried and what is currently lacking. I think a lot of C3 users would comment and +1 your thread. |
I've already tried privately, but I think it's a good idea to make a public post where others can show their support. I made a post here: https://steamcommunity.com/discussions/forum/10/591756872987476379/ |
Problem description
Steamworks addon & example project:
after exporting the project to Webview 2,
showing overlay does nothing and freezes the app window
(the other features such as displaying steam account infos are working)
Attach a .c3p
SteamPluginTest_c3p.zip
this is just the exact example project you provided here: https://www.construct.net/en/make-games/addons/1105/steamworks
Here is the export to try quicker :
SteamPluginTest r417.zip
SteamPluginTest r418.zip
Steps to reproduce
Observed result
Nothing happens (the overlay isn't shown)
The window is frozen (impossible to move or close, unless force closing using Task manager)
No error are showed in the console
Expected result
The steam overlay is shown
The window isn't frozen
More details
Tried on last stable r416, on Windows 10, with worker mode set to on and off
MORE INFOS: I asked about it on the Discord: it looks like it never works on some system (like mine), and on other computers, it seem to work but not every time, they still get the same freeze sometimes
The text was updated successfully, but these errors were encountered: