Sign in to follow this  

Frame Offset or Time Offset?

This topic is 4335 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'm currently taking a look at my Process system. And I was thinking, some processes will need to be run every thread (Render, Audio, Input, etc...), but what about all the others that won't (Networking, Physics, AI)? Should they be based on frame time or actual time? What's your experience on this? Here's my thoughts on it: Pro's for per-frame: If framerate is critical, it would allow the renderer to have priority until a good framerate is re-established. Would be more based on my game, would require less mathematical computation. (Not that it matters too much.) By being relative to my game, it could allow me to keep the game more realistic because I could choose how often something needed to be done in proportion to the frame rate. Con's for per-frame: I would have less control over time critical game components. Some things might need to be done at a certain time. Pro's for per-time: Easier time based movement. (Don't know about this one.) Con's for per-time: All the Pro's for per-frame... Right now in my head, per-frame is winning except for the fact some things might be time critical. Any experience you guys have had or wisdom on this would be apprieciated. I'm asking to know and make sure I don't mess things up too fast.

Share this post


Link to post
Share on other sites
You need to describe your system a little more. What is a process? What does "run every thread" mean? In general, it is probably easier to make everything time-based, except for the things that are time-critical. Do you have some sort of interrupt or timer callback system?

Share this post


Link to post
Share on other sites
Quote:
Original post by JohnBolton
You need to describe your system a little more. What is a process? What does "run every thread" mean? In general, it is probably easier to make everything time-based, except for the things that are time-critical. Do you have some sort of interrupt or timer callback system?


I have an event manager. It deals with processes and the Windows Proccess Callback function. While there are no Win32 messages, it runs the game. The Event Manager contains Processes, such as the render process, the logic process, the input process. Certain one's get called every frame, others don't. My "run" function, which runs every frame, calls the high priorities everytime, and checks for low priorities and if they need to run. My question is, what should my "time" unit be? Per-frame, or per-real-time?

Share this post


Link to post
Share on other sites

This topic is 4335 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this