Status
Not open for further replies.

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
540
Reaction score
326
First Language
Portuguese(BR)
Primarily Uses
RMMV
I've noticed that, for some reason, MV's games pause execution when minimized. Is there any way to change that?

I need the game to continue running even when minimized because of certain things such as loading of custom maps. If a server in my game has a custom map and its hosted on a slow file server, or the file is big or the player's connection is slow, the client may take a long time to download it and thus its expected that the player will alt tab and do other things while they wait. Having the execution pause in such moments would be annoying for the player and thats something I would like to avoid.


From my experience, I don't think its NW.js' fault, since I've made other types of applications using it and I've never noticed a pause in execution. How can I fix this?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,178
Reaction score
10,798
First Language
Czech
Primarily Uses
RMMV
Chromium will slow down the requestAnimationFrame loop a great deal when minimized. There's no way to change that other than reprogram Chromium or asynchronous programming.
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
540
Reaction score
326
First Language
Portuguese(BR)
Primarily Uses
RMMV
Chromium will slow down the requestAnimationFrame loop a great deal when minimized. There's no way to change that other than reprogram Chromium or asynchronous programming.
Yea, after some googling that seems to be the case.

I've made some tests and seems that moving part of the code to run before a reserveTransfer solves big part of my problem, although it still is going to take longer for the game to load when its minimized during said loading. I'll try to request an option to change how the requestAnimationFrame loop works in NW.js .


EDIT: Wait, I've found something.
http://docs.nwjs.io/en/latest/References/Command Line Options/#-disable-raf-throttling

By adding this line to package.json, that problem is fixed:
Code:
"chromium-args": "--disable-raf-throttling"
 
Last edited:
Joined
Sep 26, 2020
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
Adding "chromium-args": "--disable-raf-throttling" to package.json will no longer make the game pause when minimized or when the window is unfocused.
Solution for:
RPG Maker MV game pauses when minimzed.
RPG Maker MV game pauses when window loses focus.
RPG Maker MV game pauses when alt tab.
RPG Maker MV timer pauses when minimzed.
RPG Maker MV timer pauses when window loses focus.
RPG Maker MV timer pauses when alt tab.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,643
Reaction score
6,151
First Language
Dutch
Primarily Uses
RMXP

@DanMillerPlays , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts


Look at the pretty pictures, they're so lifelike, touch them... Yes... Do so.... It will be fine... Promise. :LZSgrin:
The power of tutorials. This was fun to make,parallax lightning makes more sense to me now. Now comes the annoying step of doing stuff without a step by step show though !_!
With the new phone, I can now play a lot of old RPGs that my old phone just didn't have room for. Some RPGs definitely show their age even with updated graphics and quick saving.

Forum statistics

Threads
121,966
Messages
1,145,530
Members
160,247
Latest member
matigol21
Top