Jump to content
  • Advertisement
Sign in to follow this  
Dead6re

Sharing Resources Per Task For Frames

This topic is 3841 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

Should I set aside time for processing tasks such as reading and processing the network messages, AI and path finding per frame or can I follow in one big loop. Approach 1 Perform Network Tasks Check If Timer for frame has expired, If not continue AI Processing Check If Timer for frame has expired, If not continue etc.. On Expired: Render and restart loop Approach 2 Network Tasks AI Processing etc.. Render Approach 1 has been used in FPS games, but I was wondering wether you need to allocate and check the time for each function to ensure you don't get laggy games? Game genres for each approach or a custom approach under FPS, MMO and RTS.

Share this post


Link to post
Share on other sites
Advertisement
Just one big loop should be fine. Don't limit framerates, and if it's too slow to hit a target framerate, then begin optimising problem areas.

Share this post


Link to post
Share on other sites
Do timings only if you require them, but still probably requires multiple threads. Because if you want to wait for something it is probably waiting of some other process to end. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!