Re:Flecs – A fast entity component system for C and C++
by korijn on Tuesday April 04, 2023 @02:05AM
(#35435706)
Well, 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!
Re:Flecs – A fast entity component system for C and C++
by cnity on Tuesday April 04, 2023 @04:31AM
(#35436730)
You 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.
Re:Flecs – A fast entity component system for C and C++
by Cthulhu_ on Tuesday April 04, 2023 @03:44AM
(#35436378)
Some 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.
Re:Flecs – A fast entity component system for C and C++
by exDM69 on Tuesday April 04, 2023 @09:19AM
(#35439145)
> 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.
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.