How can I make it so RPG Maker MV runs even when minimized?

I recently challenged myself to create an idle game in MV. To my surprise, the final result was more than satisfactory. However, what I didn't anticipate is that MV pauses all operation when it's minimized, which is a problem given the kind of game this is.

Would there be a way to make it so the game works even when minimized?
No. Browser reduces the speed of Javascript engine from 60 fps to ridiculously low speeds.
I recently challenged myself to create an idle game in MV. To my surprise, the final result was more than satisfactory. However, what I didn't anticipate is that MV pauses all operation when it's minimized, which is a problem given the kind of game this is.

Would there be a way to make it so the game works even when minimized?
Not really feasible, easier to have a heartbeat system that detect whenever a time skip occurs and quickly makes up for lost time.
No. Browser reduces the speed of Javascript engine from 60 fps to ridiculously low speeds.

I'm not playing it through the browser.
Not really feasible, easier to have a heartbeat system that detect whenever a time skip occurs and quickly makes up for lost time.

That's interesting to me because I know other game engines pretty much run out of focus by default. I'm not sure a heartbeat system would work when a core part of the idle "gameplay" involves going through a series of automated battles.
nwjs is a web browser. More or less.
when a core part of the idle "gameplay" involves going through a series of automated battles.
it can only work if you replace the automated battles with simulated battleresults.

But do you really think any idle game does it differently? they automate the battles while the game is running and mark the second it gets shut down on the server. Then when it starts again they simply calculate how much money/EXP/whatever you would have made on average in the time since then and give you that sum instead of calculating every battle since.
it can only work if you replace the automated battles with simulated battleresults.

But do you really think any idle game does it differently? they automate the battles while the game is running and mark the second it gets shut down on the server. Then when it starts again they simply calculate how much money/EXP/whatever you would have made on average in the time since then and give you that sum instead of calculating every battle since.

I can see this being the case, but not so much when the game is simply minimized. I understand it not working when the game is closed, but if all operation is ceased when the game is minimized then I'm not sure if I could work around that. Perhaps making an idle game in RPG Maker is a fun idea, but not something that can reasonably happen, which is a shame.

Altrernatively, is there any way I can detect when the game is minimized and when it's brought back into focus? At least then I could work in some variables.
but if all operation is ceased when the game is minimized then I'm not sure if I could work around that.
you just have to use a javascript command to load current system time into a variable, compare that variable with the last time stored and then decide how big the difference has to be to trigger a summary.
Yeah, as long as you simply make it check the current time against the previously saved time for the progression (probably you'd do it per second), it should work even when you minimize then return later.

Basically, even if the game is open, you will still consider it as being in "idle" mode.

You can make it such that if the difference is small (like 1 second if the game is actively being played) then it just adds the resources, but if the difference is large then it shows a summary of the obtained resources.

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-it-so-rpg-maker-mv-runs-even-when-minimized.111055/