Steam overlay leaves artefacts on deployed RMMV game.

Howdy folks, I have an RPG Maker MV game I have uploaded to Steam, but I'm having some problems with the Steam Overlay that I am unsure how to fix.

I have added --in-process-gpu to the launch arguments, which allows the Steam overlay to be displayed on my game. However, I get strange glitchy overlay artefacts on the black side bars when:

  • The game is maximised (But not in full screen)
Game_v245pBy1Eg.png

  • The game is full-screened.
Game_304oTgLj1W.png


So I did some research, and I found this post and followed this guide:

After following the guide, If I open the overlay with this fix, it appears fine in full-screen mode! But the moment I close the overlay, artefacts remain.
Game_V0rO7Aq7Tj.png


I have tried running the game in Canvas & WebGL mode but I'm still having issues, I do have a multitude of plugins enabled but even on a clean project I seem to be encountering issues.
My RPG Maker MV version is 1.6.2 as far as I can tell.
If anyone has seen this issue or perhaps know of a couple things I could try out, I would greatly appreciate it!
I think that's a bug in NWJS, where it's ignoring redrawing the areas outside the canvas, since it doesn't expect anything there. Off the top of my head, you could try appending a div element with the CSS "background:black;position:fixed;left:0;right:0;top:0;bottom:0;z-index:-1;pointer-events:none;" and see if that tricks the engine into redrawing.
I think that's a bug in NWJS, where it's ignoring redrawing the areas outside the canvas, since it doesn't expect anything there. Off the top of my head, you could try appending a div element with the CSS "background:black;position:fixed;left:0;right:0;top:0;bottom:0;z-index:-1;pointer-events:none;" and see if that tricks the engine into redrawing.
That code actually helped it tremendously! Now when the Steam overlay is active, there will be no artefacting! 😂

The artefacting still appears when you exit the steam overlay, albeit it is only briefly though (Usually lasting between less than a second to up to 10 seconds, but when you press a key such as Windows key, it goes away instantly)
I know Steamworks APIs have listeners for the overlay appearing and disappearing, perhaps when the listener for the overlay disappearing triggers it could gently move/resize or input something that removes the remaining artefacts.
I realized after I posted that you could also just add that div to the index.html file, wih an id if you need to modify it for some reason (like changing the color to force a redraw). Glad it works as described, though, since I couldn't actually test it. 😅
I realized after I posted that you could also just add that div to the index.html file, wih an id if you need to modify it for some reason (like changing the color to force a redraw). Glad it works as described, though, since I couldn't actually test it. 😅
I actually put the div in my index.html in the body section as such:
<div "background:black;position:fixed;left:0;right:0;top:0;bottom:0;z-index:-1;pointer-events:none;"></div>

if I replace the background-color with a background-url of a small looping gif, I wonder if that will work too.
It might, or NWJS might "optimize" again. You could also try animating the transparency property with a looping CSS animation, if you want to get really fancy with it. Play around a bit.

Honestly, a few seconds of artifacting is already better than many commercial games on Steam that can't display the overlay at all.
I think I figured out a bandaid fix/solution.
I made a 2-frame GIF (256x256) where it's just black on both frames running at 24fps
When you shift tab out of the Steam overlay, each frame of the GIF updates the background and henceforth, the overlay artefacting disappears! There is only ONE very minor issue where the window frame at the top (Game display name, minimise, maximise and close button is) does not stop the artefacts, but nevertheless I think I got the solution down! Maybe if I find people coming to this post in the future I'll make a tutorial of how the very inefficient bandaid fixes it c:

Thank you so much for your investment Lone Wolf <3

Original thread: https://forums.rpgmakerweb.com/threads/steam-overlay-leaves-artefacts-on-deployed-rmmv-game.159016/