source: ps/trunk/binaries/data/mods/public/gui/session/session.xml@ 25156

Last change on this file since 25156 was 25156, checked in by wraitii, 3 years ago

Netcode: allow observers to lag behind the live game.

Observers no longer lag the game for players. There is still some time to serialise the game when sending it to a joining observer, and depending on the chosen 'max lag' the game may stop while observers sufficiently catch up, but this impact too is reduced.

  • Make the NetServerTurnManager ignore players marked as 'observers' for the purpose of ending a turn, effectively making it possible for observers to lag without it affecting the players in any way.
  • Add a config option (network.observermaxlag) that specifies how many turns behind the live game observers are allowed to be. Default to 10 turns, or 2 seconds, to keep them 'largely live'.
  • The controller is not treated as an observer.
  • Implement a simple UI to show this delay & allow the game to speed up automatically to try and catch up. This can be deactivated via network.autocatchup.
  • Move network options to the renamed 'Network / Lobby' options page.
  • Do not debug_warn/crash when receiving commands from the past - instead warn and carry on, to avoid DOS and "coop play" issues.

Refs #5903, Refs #4210

Differential Revision: https://code.wildfiregames.com/D3737

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 3.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<objects>
4
5<script directory="gui/common/"/>
6<script directory="gui/common/campaigns/"/>
7<script directory="gui/maps/"/>
8<script directory="gui/session/"/>
9<script directory="gui/session/campaigns/"/>
10<script directory="gui/session/chat/"/>
11<script directory="gui/session/developer_overlay/"/>
12<script directory="gui/session/diplomacy/"/>
13<script directory="gui/session/diplomacy/playercontrols/"/>
14<script directory="gui/session/lobby/"/>
15<script directory="gui/session/lobby/LobbyRatingReport/"/>
16<script directory="gui/session/message_box/"/>
17<script directory="gui/session/minimap/"/>
18<script directory="gui/session/objectives/"/>
19<script directory="gui/session/top_panel/"/>
20<script directory="gui/session/top_panel/IconButtons/"/>
21<script directory="gui/session/trade/"/>
22
23<object name="session">
24
25 <action on="Tick">
26 onTick();
27 </action>
28
29 <action on="SavegameLoaded">
30 restoreSavedGameData(arguments[0]);
31 </action>
32
33 <action on="SimulationUpdate">
34 onSimulationUpdate();
35 </action>
36
37 <!-- Hotkeys won't work properly unless outside menu -->
38 <include directory="gui/session/hotkeys/"/>
39
40 <include file="gui/session/NetworkStatusOverlay.xml"/>
41 <include file="gui/session/NetworkDelayOverlay.xml"/>
42 <include file="gui/session/PauseOverlay.xml"/>
43 <include file="gui/session/TimeNotificationOverlay.xml"/>
44
45 <!-- Chat messages -->
46 <object name="chatPanel" size="0 131 100% 100%-240" z="0" absolute="true">
47 <object name="chatLines">
48 <repeat count="20">
49 <object name="chatLine[n]" size="3 0 100% 17" type="button" style="chatPanelOverlay" tooltip_style="sessionToolTipBottomBold" ghost="true" hidden="true"/>
50 </repeat>
51 </object>
52 </object>
53
54 <include directory="gui/session/chat/"/>
55 <include directory="gui/session/developer_overlay/"/>
56 <include directory="gui/session/dialogs/"/>
57 <include directory="gui/session/diplomacy/"/>
58 <include directory="gui/session/objectives/"/>
59 <include file="gui/session/GameSpeedControl.xml"/>
60 <include file="gui/session/PanelEntities.xml"/>
61 <include file="gui/session/ResearchProgress.xml"/>
62 <include file="gui/session/TopPanel.xml"/>
63 <include file="gui/session/trade/TradeDialog.xml"/>
64 <include file="gui/session/tutorial_panel.xml"/>
65 <include file="gui/session/Menu.xml"/>
66
67 <!-- Contains miscellanious objects s.a.: the technology research -->
68 <!-- progress, group selection icons, and the hero selection icon -->
69 <include directory="gui/session/session_objects/"/>
70
71 <!-- Information tooltip -->
72 <!-- Follows the mouse around if 'independent' is set to 'true'. -->
73 <object name="informationTooltip" type="tooltip" independent="true" style="informationTooltip"/>
74
75 <!-- Structure placement info tooltip -->
76 <object name="placementTooltip" type="tooltip" independent="true" style="informationTooltip"/>
77
78 <!-- START of BOTTOM PANEL -->
79 <!-- Limit to the minimal supported width of 1024 pixels. -->
80 <object size="50%-512 0 50%+512 100%">
81
82 <object size="50%-512 100%-200 50%-312 100%">
83 <include directory="gui/session/minimap/"/>
84 </object>
85
86 <!-- Supplemental Details Panel (left). -->
87 <object name="supplementalSelectionDetails"
88 size="50%-316 100%-166 50%-110 100%"
89 sprite="supplementalDetailsPanel"
90 type="image"
91 z="20"
92 >
93 <include directory="gui/session/selection_panels_left/"/>
94 </object>
95
96 <!-- Selection Details Panel (middle). -->
97 <object name="selectionDetails"
98 size="50%-114 100%-200 50%+114 100%"
99 sprite="selectionDetailsPanel"
100 type="image"
101 >
102 <include directory="gui/session/selection_panels_middle/"/>
103 </object>
104
105 <!-- Commands Panel (right). -->
106 <object name="unitCommands"
107 size="50%+110 100%-166 50%+512 100%"
108 sprite="unitCommandsPanel"
109 type="image"
110 z="20"
111 >
112 <include directory="gui/session/selection_panels_right/"/>
113 </object>
114 </object><!-- END OF BOTTOM PANEL -->
115</object> <!-- END OF SESSION OBJECT -->
116
117<!-- Selection bandbox -->
118<object name="bandbox" type="image" sprite="bandbox" ghost="true" hidden="true" z="200"/>
119
120</objects>
Note: See TracBrowser for help on using the repository browser.