Networked Simulation Analyzer
“Networked Simulation Analyzer” is a tool for authoritative gameplay state analysis which aims to make debugging of networked simulation easier. It also allows you to understand implemented networked mechanics better.
The unique feature of the tool is its ability to re-apply collected state on demand, what gives you a chance not only to analyze data as text, but also to observe actual changes to the gameplay scene dynamically!
It also lets you save and load gameplay replay files, which may be helpful in collaborative troubleshooting or introducing new developers to the project.
InformationThe tool supports only Unity 2020.2 and above.
What information does it provide?
At the end of every Tick, the tool collects data synchronized in
ElympicsBehaviours along with received inputs. It also estimates the size of each collected state.
NoteProvided sizes of synchronized data are not the sizes of snapshots Clients receive. It’s because Tick state provided by the tool is complete, and thus sizes provided in the tool are maximal estimates for given
ElympicsBehaviours. On the other hand, Client is unlikely to receive complete state every Tick – it depends on
ElympicsBehavioursand frequency of synchronized state changes.
Very important part of the tool is estimating Tick execution time of the Authority (likely a Server) in relation to the constant maximum (
TickDuration). If it’s close to the threshold, you will notice yellow color instead of standard – green. If it’s equal or above, it becomes red. You should be aware of these situations, because exceeding
TickDuration means we can no longer keep constant
TicksPerSecond ratio, which is against our core architecture and can cause problems with further synchronization (until it catches up with the
TicksPerSecond value). Especially, watch out for subsequent high-load Ticks. In such cases reconsider your scripts or decrease the
TicksPerSecond value in
NoteYou will likely notice exceeding maximum execution time (red color) on game initialization and when a Client connects to the Authority. It’s common behavior and should not be considered as a problem.
At the moment, input content isn’t displayed, but in many cases information about receiving it or not should be sufficient. Note that
Missing means Client input hasn’t reached Authority on time, and thus it was omitted. In such a case, the previous input could be used as shown here. On the other hand,
Received (0B) signifies that connection was established but no data was sent (which may be correct in most turn-based games but rarely in real-time ones).
How to use it?
Currently, Networked Simulation Analyzer is available only on
Half Remote and
Local Player And Bots modes, which also means it can’t be used in builds. Unity version 2020.2 or newer is required. You can open the tool by choosing
Tools/Elympics/Networked Simulation Analyzer from the menu bar.
In order to collect Tick data, you need to have the tool opened and the game running. The state is automatically collected and appended to the list on the left. The list is cleared every time the game is started (so even if you load the data from a file it will be overriden nonetheless). The tool state doesn’t persist, so closing it will result in losing collected data.
You can view chosen Tick state by selecting corresponding entry from the list pane on the left.
Networked simulation can be paused to halt the collection of Tick data and enable remaining features, described below. Note that this pause differs from well-known Unity Editor pause – local simulation such as basic animations will not be paused as it is not synchronized! You can switch it by using the pause toggle on the top bar. (From now on we will refer to networked simulation pause simply as pause, do not mistake it for Unity pause.)
Applying Tick state
You can apply the state of the selected Tick by clicking “Apply State” button in the Tick view when the game is running and networked simulation is paused. You will notice visible changes on the game scene (if any occured). It’s important to understand that only the synchronized state is applied to the game scene. Non-synchronized state is not changed.
There is also a possibility to do it automatically on Tick selection instead of using the button, but it requires checking the corresponding checkbox first. It won’t do anything if the game isn’t paused.
TipYou can go through subsequent Ticks rapidly by choosing one Tick and using up/down arrow keys.
If you apply some state and then unpause, the tool will automatically restore the state from before pausing to preserve the gameplay consistency.
Saving/loading from a file
Once the simulation is paused, you can save collected data to a file by using corresponding button on the top bar.
Then, the file can be loaded if pause is applied or the game isn’t running. Note that it will override previously collected data and you will be unable to unpause until you restart the game.
ImportantWhen loading a file, the game scene must be in the same version as when the file was created. Any change on the scene or in the code can render the file incompatible. Keep that in mind as precise verification of file validitiy is yet to be implemented.
If you are stuck using the tool, you can always find this page by clicking the “How to use?” label on the top bar. There are also useful tooltips to the controls which can be seen by hovering the mouse over a certain control element, but only when the game is in the Edit Mode.
If there is something you still don’t understand or you encounter any issues with the tool, we would be glad to hear from you at our support server, which you can find in the top bar of the documentation site.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.