Difference between revisions of "4/Threading"
From Worms Knowledge Base
CyberShadow (Talk | contribs) (→Questions) |
CyberShadow (Talk | contribs) (fibers?) |
||
Line 10: | Line 10: | ||
* When, and in which thread does the game's display list (scene) get constructed? | * 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? | * How much will threading / message passing affect performance, compared to a single-threaded solution? | ||
+ | * What about fibers? |
Revision as of 07:31, 11 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 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?