I’m creating a game in WPF and I’m wondering if it is a wise decision to divide game logic and graphics to different threads.
My game logic works in steps (one step takes about 30 ms).
I’m quite afraid that locks will decrease the performance.
What do you think? Does anyone have an experience with that?
Thank you!
The cons regarding this far outweight the pros (i.e., manual message passing, synchronisation issues). Don’t forget that the back-end presentation logic may already be executing in a separate thread. Most likely, the functions are already queuing up operations on a message bus and return instantly.