Multi threaded game - updating, rendering, and how to split them
Posted
by
CodeBunny
on Game Development
See other posts from Game Development
or by CodeBunny
Published on 2011-04-04T13:48:55Z
Indexed on
2012/10/11
3:53 UTC
Read the original article
Hit count: 487
From the StackOverflow post (it was recommended I move this):
So, I'm working on a game engine, and I've made pretty good progress. However, my engine is single-threaded, and the advantages of splitting updating and rendering into separate threads sounds like a very good idea.
How should I do this? Single threaded game engines are (conceptually) very easy to make, you have a loop where you update -> render -> sleep -> repeat. However, I can't think of a good way to break updating and rendering apart, especially if I change their update rates (say I go through the update loop 25x a second, and have 60fps for rendering) - what if I begin updating halfway through a render loop, or vice versa?
© Game Development or respective owner