SFML community forums
Help => General => Topic started by: BlueMagic on February 13, 2012, 05:00:39 pm
-
I have seen quite a few game developers (including some from here) claim that they make the collision detection/logic run faster than the draw loop (ie: collision detection at 1000hz and drawing at 60hz or whatever). What are the ways of achieving this?
I'm guessing threads are pretty much the only option (someone correct me if I'm wrong), but what do I want to have in consideration when programming this? Does anyone have some article as reference or anything?
Thank you very much
-
No, threading is unnecessary. Logic is something very separate from drawing, so running the two at separate speeds isn't very problematic at all - just don't draw stuff when you don't need to.
(Though running logic at 60 Hz should be more than enough for most applications anyways).
-
Ho would I go about doing it then?
-
This page should have all information you need:
http://www.koonsolo.com/news/dewitters-gameloop/