4/Threading
From Worms Knowledge Base
(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 windows?
- When, and in which thread does the game's display list (scene) get constructed?
- How much will threading / message passing affect performance, compared to a single-threaded solution?
- What about fibers?