You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: replacing polling for lobby updates with LobbyEvents [MTT-5425] (#805)
* replacing polling for lobby updates with lobby events
* adding support for deleted lobby events
* updating to lobby 1.1.0-pre.3
* fixing issue with UpdateRunner using wrong dt when updating subscribers
* simplifying LobbyServiceFacade delete, leaveLobby and reconnect method calls
* Adding early return in reconnection when lobby is deleted
* removing GetLobby unused method
* Adding short delay before first reconnect attempt to give time for lobby to be properly updated
Co-authored-by: Sam Bellomo <[email protected]>
m_UnityServiceErrorMessagePub.Publish(newUnityServiceErrorMessage("Host left the lobby","Disconnecting.",UnityServiceErrorMessage.Service.Lobby));
148
-
awaitEndTracking();
149
-
// no need to disconnect Netcode, it should already be handled by Netcode's callback to disconnect
150
-
}
151
-
}
152
-
catch(LobbyServiceExceptione)
153
-
{
154
-
if(e.Reason==LobbyExceptionReason.RateLimited)
155
-
{
156
-
m_RateLimitQuery.PutOnCooldown();
157
-
}
158
-
elseif(e.Reason!=LobbyExceptionReason.LobbyNotFound&&!m_LocalUser.IsHost)// If Lobby is not found and if we are not the host, it has already been deleted. No need to publish the error here.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
7
7
Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com).
8
8
9
9
## [unreleased] - yyyy-mm-dd
10
+
11
+
### Changed
12
+
* Replaced our polling for lobby updates with a subscription to the new Websocket based LobbyEvents (#805). This saves up a significant amount of bandwidth usage to and from the service, since updates are infrequent in this game. Now clients and hosts only use up bandwidth on the Lobby service when it is needed. With polling, we used to send a GET request per client once every 2s. The responses were between ~550 bytes and 900 bytes, so if we suppose an average of 725 bytes and 100 000 concurrent users (CCU), this amounted to around 725B * 30 calls per minute * 100 000 CCU = 2.175 GB per minute. Scaling this to a month would get us 93.96 TB per month. In our case, since the only changes to the lobbies happen when a user connects or disconnects, most of that data was not necessary and can be saved to reduce bandwidth usage. Since the cost of using the Lobby service depends on bandwidth usage, this would also save money on an actual game.
13
+
*
10
14
### Cleanup
11
15
* Clarified a TODO comment inside ClientCharacter, detailing how anticipation should only be executed on owning client players (#786)
12
16
* Removed now unnecessary cached NetworkBehaviour status on some components, since they now do not allocate memory (#799)
@@ -18,6 +22,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
18
22
* EnemyPortals' VFX get disabled and re-enabled once the breakable crystals are broken (#784)
19
23
* Elements inside the Tank's and Rogue's AnimatorTriggeredSpecialFX list have been revised to not loop AudioSource clips, ending the logging of multiple warnings to the console (#785)
20
24
* ClientConnectedState now inherits from OnlineState instead of the base ConnectionState (#801)
25
+
* UpdateRunner now sends the right value for deltaTime when updating its subscribers (#805)
0 commit comments