• Advertisement

Archived

This topic is now archived and is closed to further replies.

game loop timing

This topic is 6795 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to make my game processing and rendering loops seperate from each other...that is to say, I want my all the logic processing to happen, say, every 10 milliseconds, and all the rendering to occur as often as possible depending on the user's hardware. I've put my rendering loop in a seperate thread from all the other processing, and, while this seems to work, I don't think it is the best solution.

What other options are there? I'd like to put my rendering function at the end of the game loop and only call it if there's time left...but how much time is enough depends on the user's hardware. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Hi cerberus!

About the user's hardware: Use a routine that does some calculations and takes the time it needs. ( Maybe your game does some precalculations when started, these routines could be used for timetaking). Then you know the speed of the hardware. Depending on this value, you can chose how many LogicLoops per Rendering Loops you want to have.

hope this helps you a little

Gecko

Share this post


Link to post
Share on other sites

  • Advertisement