Difference between revisions of "4/Threading"

From Worms Knowledge Base

Jump to: navigation, search
(for a start)
 
(Questions)
Line 7: Line 7:
  
 
=== Questions ===
 
=== Questions ===
* Level of separation of individual UI elements?
+
* Level of separation of individual UI windows?
 
* 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?

Revision as of 20:46, 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 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?
Personal tools