2 ms·
I wrote a game engine that did that, because it was for a very simple, largely static scene. You would implement it almost the same as a standard Windows GUI -
by jiggawatts 4y ago
I wrote a game engine that did that, because it was for a very simple, largely static scene.
You would implement it almost the same as a standard Windows GUI -- using an event handler loop that marks the screen as "dirty" and needing a refresh if it has changed.
Where it would immediately break down is ongoing animations. If you stopped moving your mouse, then animations would stop. Of course, you can set up the event loop to continue triggering if there are animations going on, but then you basically have a standard game engine loop running most of the time.
Personally, I'd be happy if games simply paused rendering when minimised. Some games do this, some don't.
- exDM69 4y ago> I'd be happy if games simply paused rendering when minimised. Some games do this, some don't. Yes, please. It drives me nuts to have GPU fans spinning when game is minimized, paused, in the loading screen, turn based and no inputs, etc.
- korijn 4y agoWell, if those animations are things such as camera smoothing, it won't have such an impact. But I see your point. Thanks for entertaining the idea!
- cnity 4y agoYou just have to include all the parameters of the animation as part of your "dirtiness" calculation. I reckon in practice this means centralising pretty much _all game state_ in some way that you force the dirtiness state to be set correctly.
- Cthulhu_ 4y agoSome games (I'm thinking FFXIV) will run on a lower framerate (15fps) while minimized or, in that game's case, if the player is idle for an X amount of time, that's a pretty decent compromise. But yeah, games don't need to render any frames while minimized. I do feel like this should be the operating system's responsibility as well, but then, a lot of games still have the graphics rendering and other parts of the game linked tightly together.