Is there anyway to make game window still process even when the pop up is open?

Hello, I want to make a 4th-wall-breaking-system in my game, such as the character moving out of the game application window and roaming around the desktop.

To make this happen, I had to make a transparent pop up window to be open, so that the players would think it actually 'went out of the application screen'. I've almost successfully made out to make a pop up window transparent and to set up character roam around, but there is two major problems:

1. when the pop up window is opened, the game window lose its control and stop processing. I can't press on the enter key nor make the event autoprocess work, it just stops COMPLETELY -\ for example, if there is another text after the scene, it's not leading to that text, and the screen stops. Is this normal? I want the game window to still process and make autoprocess even when the pop up is open. Is there any javascript code for that?

2. When opening the pop up window, I've used nw.window.open() instead of window.open() because I wasn't able to control the transparency when I use window.open(). However, now I can't find the right code to CLOSE this popup since it's not a major used code.
I specifically want the pop up window to be open, then a few lines of text goingon the major-game window, and then the pop up to be closed- so the code for opening and closing the pop up should be split. (There could be some points which I'm totally wrong because I am a newbie for both RPG making and coding.......)

this is my code(the html code is longer so I've attached the pic)

var _width = window.screenLeft

var _top = window.screenTop + window.outerHeight

var HHeight = window.screen.availHeight - _top

win = nw.Window.open('js/vscode/html/index.html', {frame:false, transparent: true, width:window.screen.width, height:HHeight}, function(win) {win.moveTo(_width, _top);});



I am not using any plugins rn
Are you sure you are using MV? Because without a plugin MV game doesn't stop when losing focus.
You can't control, yes, it is normal because the window loses focus, but not paused.
It is the default MZ behavior the game pauses when losing focus. You can make it regain focus using a code like this:
nw.Window.get().focus();

As for your other questions, I think you'd better read the nw.js documents carefully.
For example Window.open use a callback function in which you get the window object. The open function itself doesn't return a window object.
Further more, if it uses a callback it means there is a delay so if you want it run smoothly you need to open the window beforehand and hide it. There could be more tricks but you need to read the documents to use them.
Are you sure you are using MV? Because without a plugin MV game doesn't stop when losing focus.
You can't control, yes, it is normal because the window loses focus, but not paused.
It is the default MZ behavior the game pauses when losing focus. You can make it regain focus using a code like this:
nw.Window.get().focus();

As for your other questions, I think you'd better read the nw.js documents carefully.
For example Window.open use a callback function in which you get the window object. The open function itself doesn't return a window object.
Further more, if it uses a callback it means there is a delay so if you want it run smoothly you need to open the window beforehand and hide it. There could be more tricks but you need to read the documents to use them.

Yes I'm using MV, and from your reply I found out that the screen was not actually paused - it was just losing focus so that it won't go to the next text, which I've thought it was pausing. Now I found a way to solve. I just made the text to go after even when the enter key is not pressed. Thanks for telling me!

I've also found out that even I use nw.window.open() instead of window.open(), I can just simply put in window.close() code in the html, so that it will work same as the latter one.
Thank you so much for the support.

Now the thing is - well, it closes when I put in the code, but I want the window to close when the character image moves then touches the bottom of the desktop screen. I've searched and got the idea of getboundingclientRect() and others, but I think I'm missing important point. Do you have any methods for this? (I've attached pics again about what I'm explaining and what I've tried)

+ Actually, do you know if the same thing will work on VX ACE by using ruby script? This was the main reason why I leaved VX ACE and change to MV.... but I'm still willing to go back to VX ACE.
I don't think VX Ace can do that unless you are talking about using 3rd dlls to create another window...

As for your other question, there's a document.body.clientHeight or window.innerHeight
I don't think VX Ace can do that unless you are talking about using 3rd dlls to create another window...

As for your other question, there's a document.body.clientHeight or window.innerHeight
Ok, maybe I will stick to MV then.
I tried to use the code you wrote: is this what you thought? I'm trying to find a error on this since it doesn't close the window
Maybe it should be please>=document.body.clientHeight
Maybe it should be please>=document.body.clientHeight
I tried and the window closes right after its open.
By trying multiple times, I figure out that when 'please' == 5, the window closes immediately - the value of getboundingclientRect().top is same as 5 I think, and it kinda sticks to that value and doesn't change even when the image moves around
The only part where I used value 5 were at the top when I describe the CSS position as the word 'absolute'(while I couldn't even understand even with the description), so I'm assuming maybe it's because of that.
I'll try to figure out more, but still thank you.
OK then window.innerHeight is safer because document.body can be affected by styles?

Edit*
It doesn't make sense getBoundingBox remains the same value.
However, document.body.clientHeight could be near 0 if you don't give it a height in css.
Heya, just came here to say this is really cool stuff and helps me with something i'm making lol, thanks for doing this post.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-anyway-to-make-game-window-still-process-even-when-the-pop-up-is-open.174920/