Difference between revisions of "4/Threading"
From Worms Knowledge Base
CyberShadow (Talk | contribs) (for a start) |
(No difference)
|
Revision as of 20:45, 9 August 2010
(Up to 4)
Arguments
- Having the game engine run in its own thread is a huge plus by itself. Game lag won't have to also mean UI lag.
- Having logic and user interface run in separate threads allows simple usage of modal dialogs, e.g. message boxes (you don't have to specify class-level callbacks, but rather call a function and check the return value, like with the Windows MessageBox API)
- Combining SDL and network event loops in a single thread would be complicated.
Questions
- Level of separation of individual UI elements?
- When, and in which thread does the game's display list (scene) get constructed?