-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathDESIGN.txt
More file actions
28 lines (21 loc) · 1.29 KB
/
Copy pathDESIGN.txt
File metadata and controls
28 lines (21 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
DESIGN
The source code is split into two main directories:
- engine ) Contains all the sources for the core game engine.
- interface ) Contains interfaces for interacting with the engine.
The engine uses four threads:
- main thread ) This is running the main Qt event loop where all events from
the interfaces and timers initially enter. Every action that
needs to be done on the game data is posted as an event on the
game thread.
- game thread ) The game thread processes events that manipulate the core game
data. Any generated output is passed back through Qt signals
back to the interfaces. When an object is modified, an event
is posted to the sync thread for synchronizing the changes to
disk.
- sync thread ) The sync thread writes modified objects back to disk.
- log thread ) The log thread writes all log messages (including statistics)
to disk. In addition, when statistics are requested through
the admin interface, it is used for aggregating the results.
Note: It is important to note that all game objects are assigned to the main
thread even though all manipulation (after the initial loading) is done
by the game thread.