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

Crysillion

Veteran
Veteran
Joined
Sep 25, 2014
Messages
138
Reaction score
20
Primarily Uses
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?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,062
Reaction score
10,363
First Language
Czech
Primarily Uses
RMMV
No. Browser reduces the speed of Javascript engine from 60 fps to ridiculously low speeds.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
407
Reaction score
262
First Language
English
Primarily Uses
RMMV
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.
 

Crysillion

Veteran
Veteran
Joined
Sep 25, 2014
Messages
138
Reaction score
20
Primarily Uses
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.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,062
Reaction score
10,363
First Language
Czech
Primarily Uses
RMMV
nwjs is a web browser. More or less.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,012
Reaction score
7,023
First Language
German
Primarily Uses
RMMV
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.
 

Crysillion

Veteran
Veteran
Joined
Sep 25, 2014
Messages
138
Reaction score
20
Primarily Uses
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,012
Reaction score
7,023
First Language
German
Primarily Uses
RMMV
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,696
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I feel that I should cut down on my order queue so I can get some more time for my projects, its been quite a longggg while since I worked on them LOL
I friend of mine insisted on practicing dubbing things with him... and its quite funny, yet, it really takes a huge amount of practice!
Gotta save this for my next thread later...
Finsh all of the walking dead game in a week, such an amazing emotional trip
I really need to stop sidetracking sometimes

Forum statistics

Threads
97,872
Messages
947,517
Members
129,107
Latest member
waybinary
Top