Original Post
So I'm currently working on a multicore engine with ideas taken from this intel article:
Designing the Framework of a Parallel Game Engine
I'm still trying to figure out if I should separate my engine into some main asynchronous threads or to keep everything in 1 thread and use only the tasks.
My idea so far is to have the Game/AI/Physics be one main thread. The graphics be another main thread that updates asynchronously from the game. The sound output would be its own thread as well. And each network connection would be its own thread.
I have a pretty good mechanism in the works for keeping them all in synch, but I'm still wondering if this is going to give me the benefits I'm thinking I will get.
Multiple Asynchronous threads:
Pros:
Game loop updates at 60 times per second and is completely asynchronous from graphics or audio...
Cons:
The engine is a bit more complicated and a little harder to keep in synch but not really...
One main thread:
Pros:
A bit simpler. It may or may not perform better.
Cons:
The Game thread will need to have its timestep fixed if things like graphics slow it down to less than 60 FPS.
Designing the Framework of a Parallel Game Engine
I'm still trying to figure out if I should separate my engine into some main asynchronous threads or to keep everything in 1 thread and use only the tasks.
My idea so far is to have the Game/AI/Physics be one main thread. The graphics be another main thread that updates asynchronously from the game. The sound output would be its own thread as well. And each network connection would be its own thread.
I have a pretty good mechanism in the works for keeping them all in synch, but I'm still wondering if this is going to give me the benefits I'm thinking I will get.
Multiple Asynchronous threads:
Pros:
Game loop updates at 60 times per second and is completely asynchronous from graphics or audio...
Cons:
The engine is a bit more complicated and a little harder to keep in synch but not really...
One main thread:
Pros:
A bit simpler. It may or may not perform better.
Cons:
The Game thread will need to have its timestep fixed if things like graphics slow it down to less than 60 FPS.