I couldn't find anything much about this. Is there a way to communicate to the operating system that the computer is active (and thereby suppressing any screensaver, shut down, or other consequences of inactivity) while the game is running even if the player hasn't touched input in a while (e.g. during a cut scene)? Simulating a key press or 1px mouse movement every 59 seconds or something like that?
In general, how do other games and pieces of software do this? Most games if I walk away for five minutes and come back, they're still as I left them, no screen saver. Or if I run a video on VLC, the screen saver won't interrupt. What does RM or NW.js do differently?
mostly how they put the screensaver setting (I dont use any), but you can do the following
to test it out and set your screensaver to 1 min to test it.
make a parallel process or variable for 30 seconds (so this loops)
than something with, if (! $gamePlayer.isMoving()) {
code here to press a button (maybe OK button or any button like number 1)
};
now, when the game is active (in window mode) this should work in theory,
but if the game is NOT active (like clicking outside of it) this probably doesn't work.
but you need to test it out if it does or not, but not sure if you can command the system
for avoiding sleeping though.
I was thinking of trying something like that, but I wasn't sure if the code associated with button presses in MV would actually simulate a button press to the operating system, or whether it would merely be recognized within the software itself. But, it would be a pretty simple solution so I'll give it a try!
It's certainly a minor issue, I only noticed while play testing on my laptop in battery mode (my minimum spec baseline 😛 ) where the power settings are rather strict.
as long as the game is active window, it shouldn't be stricts, if the window isn't active,
it's a different story while a parallel proces automatically trigger or press the button
if the player doesn't move and repeat the process every 30 seconds.
what I do notice in another game made by MV, when the window isn't active, the
game freezes untill the window is active.
I'm not sure if it's possible to keep that running if the window isn't active.
if the laptop is more strict than that and "read" the afk outside the game as continuous,
than I have no clue behind that.
it may be easy, but it might be complex (even if the player doesn't want to keep it
running when he/she is afk, if it does work in one way, you can make this an option =).