3 ms·
ECS isn't really relevant to the question game loops usually call into simulate() and render() entrypoints. There's state potentially mutated by simulate()..
by pengaru 4y ago
ECS isn't really relevant to the question
game loops usually call into simulate() and render() entrypoints.
There's state potentially mutated by simulate().. render() looks at that state and potentially produces a new output to present on-screen.
Typically the render() entrypoint returns a status indicating whether a new output was produced or not to put on-screen. If no output was produced you don't flip pages. So in a quiescent situation with nothing changing, render() returns "don't flip" and you just leave the existing page displayed til the next iteration.
How you track the internal game state / dirty vs. clean state is implementation detail behind those simulate() and render() entrypoints and depends greatly on the type of game.