-
-
Notifications
You must be signed in to change notification settings - Fork 98
Documentation
The class HostWindow:89 contains the entry point of the mod. It is responsible for creating the Multiplayer menu item, which allows the player to either join an existing game, or host a new game.
- Create listener to add or update LAN server connections
- Create NetManager on port 5100
Async time is disabled here: HostWindow.cs:129
It looks like there are 2 commands, which are hard-coded. Chat command loading might need to be made dynamic, preferably by registering chat commands defined in a file. MultiplayerServer:77
Contains method to start hosting a server, good starting point see how the server works.
When hosting a server, the Arbiter is started here: ClientUtil:201
Main server update loop: MultiplayerServer:109 The server ticks at a rate of 16.66... ms per tick. This tick rate is variable though, since the sleep timing is set to 10ms. Can the sleep time be calculated, so that the tick rate is going to be as close to 16.66...ms as possible?
SteamIntegration:114
Multiplayer.cs:164