Seven is the number.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

200 lines
21 KiB

4 years ago
  1. Photon Realtime C# Client - Changelog
  2. Exit Games GmbH - www.photonengine.com - forum.photonengine.com
  3. Version 4.1.2.19 (12. November 2019 - rev5266)
  4. Fixed: The ExpectedProtocol is now also set for Authmode "AuthOnce" for ConnectToNameServer and ConnectToRegionMaster.
  5. Changed: Player.ToString() to show ActorNumber and NickName. The PlayerProperties are included in ToStringFull().
  6. Changed: Logging message for OpAuthenticateOnce (only logged at info level and up).
  7. Changed: Avoiding a potential nullreference exception on leave of another player.
  8. Updated: Cluster support. The LoadBalancingClient.CurrentCluster gives access to the current cluster. Region.SetCodeAndCluster() now separates the cluster string properly. See ConnectToRegionMaster, too.
  9. Fixed: Changing the SupportLogger.Client now skips registering for callbacks, if the new value is null.
  10. Changed: Logging of SupportLogger.
  11. Added: LoadBalancingClient.OpJoinRandomOrCreateRoom. This can be used to create a room, should random matchmaking fail. This helps avoid race conditons where players can't find one another.
  12. Added: Extra null-check in handling of event leave.
  13. Version 4.1.2.17 (9. August 2019 - rev5188)
  14. Changed: SupportLogger. Traffic stats are enabled by default. The PhotonHandler no longer has to enable this.
  15. Added: Min/max ping to logged statistics. SupportLogger.TrackValues is invoked to keep track of min/max ping for each connection.
  16. Fixed: Statistics logging is started on Connect and stopped OnDisconnected().
  17. Changed: Callback registration.
  18. Changed: All callback target changes are now queued in one queue and executed in order. This avoids cases where our implementation defined if a callback got added or removed, when a target got added and removed.
  19. Changed: Duplicate addition and removal is now prevented.
  20. Changed: The callback containers now know and use the LoadBalancingClient to update the targets. This means they don't need lists for additions and removals anymore.
  21. Changed: Events will now also update the callback targets before executing the event callback.
  22. Changed: WebRpcCallbacksContainer is now also a List<i> like the other containers. This is simpler to maintain. The only "custom" callback implementation is that for events. This was an event delegate before and remains one. No change for this.
  23. Changed: The callbacks to OnDisconnected(reason). On timeout or exception, there is now only one callback which happens after the client/peer is actually disconnected. The peer's status changes (timeout, etc.) are used to identify the reason but don't cause a callback on their own. Previously, you could run into more than one OnDisconnected call and fail to reconnect in the first one.
  24. Changed: There are now fewer calls of OnDisconnected(). Example: A timeout disconnect caused two calls because signalled the timeout and the second signalled when the client locally finished disconnecting. Now, the DisconnectCause stores the reason and there is only one callback.
  25. Changed: Internal use of DisconnectCause. It's now set in LBC.Disconnect() and by errors from the Peer. It's reset to "None" before calls to Peer.Connect().
  26. Removed: DisconnectCause enum values that were obsolete already. DisconnectByServerUserLimit is now MaxCcuReached. TimeoutDisconnect is now ClientTimeout. DisconnectByServer is now ServerTimeout.
  27. Changed: OnStatusChanged() case Disconnect always sets the CurrentRoom to null. It is no longer used to store the roomname from the Master Server to use on the Game Server.
  28. Removed: LoadBalancingClient.didAuthenticate, which is no longer needed for the cleaned up logic.
  29. Changed: WebRpcResponse.ReturnCode -> ResultCode and WebRpcResponse.DebugMessage -> Message.
  30. Changed: AuthenticationValues.ToString() to include more useful info.
  31. Changed: Execution order for disconnect on quit. As OnApplicationQuit is followed by OnDisable, PUN now disconnects in OnDisable, if OnApplicationQuit was called previously. This means that you can now send a final message in OnApplicationQuit. It's not guaranteed to arrive anywhere, as the message won't be repeated on loss.
  32. Removed: PhotonHandler.OnDestroy which was not needed anymore. OnDisable is also called when the app quits, so it's adequate to tear down the thread there.
  33. Removed: Outdated and unused PingMonoEditor.
  34. Changed: Random ID for each ping is now truly randomized.
  35. Changed: Region pinging result logging. Per region, all rtts are available, as well as a previous summary (if any). Pun gets it via RegionHandler.GetResults().
  36. Version 4.1.2.15 (7. June 2019 - rev5137)
  37. Added: Options for OpFindFriends to filter which rooms should be returned by the server. The default is the same as before but now the friend list may exclude rooms which are not yet on the game server, invisible, closed (or any combination).
  38. Added: SimulateConnectionLoss(bool) to simplify testing of connection loss. This uses the built-in network simulation to get a client timeout disconnect.
  39. Removed: EventExt class, which only contained obsolete methods.
  40. Version 4.1.2.14 (6. May 2019 - rev5097)
  41. Changed: Realtime API changes are now listed in a separate changes file.
  42. Updated: Demos to make use of Sender and CustomData.
  43. Version 4.1.2.13 (3. May 2019 - rev5086)
  44. Changed: Renamed ClientState items which ended on "Gameserver" and "Masterserver" to using PascalCase "GameServer" and "MasterServer". The previous names are obsolete to ease upgrading this, if needed.
  45. Updated: Checks if any given operation can be sent (to the currently connected server) or not. As not all operations are available on all server types, this may help avoid some mismatches.
  46. Fixed: BroadcastPropsChangeToAll is applied correctly (it wasn't used properly, when false).
  47. Fixed: When in offline mode, OpSetPropertiesOfActor does not get called (it failed due to not being connected).
  48. Version 4.1.2.11 (15. April 2019 - rev5043)
  49. Changed: InLobby property is now checking the State == JoinedLobby, which is analog to InRoom.
  50. Changed: IsConnectedAndReady is now also false for ClientState.DisconnectingFromGameserver, DisconnectingFromMasterserver and DisconnectingFromNameServer.
  51. Changed: GetGameList check if the filter is null or empty. It's not sent for empty filters.
  52. Added: Nintendo Switch as CustomAuthenticationType.
  53. Version 4.1.2.10 (11. March 2019 - rev5023)
  54. Changed: The cached "best region" is cleared whenever a region's pinging finishes. This fixes a potential issue when the BestRegion value is used before the pinging is done. Then, you end up with a wrong selection.
  55. Version 4.1.2.1 (31. July 2018 - rev4787)
  56. Changed: OnStateChangeAction is now named StateChanged and provides a "previous state" value. State changes only trigger the event-call when the value actually changes.
  57. Renamed: OnEventAction to EventReceived and OnOpResponseAction to OpResponseReceived.
  58. Added: LoadBalancingClient now has AddCallbackTarget and RemoveCallbackTarget to simplify registering for various callbacks.
  59. Version 4.1.2.0 (3. May 2018 - rev4660)
  60. Changed: The namespace to the simpler "Photon.Realtime".
  61. Added: Various callbacks to signal specific situations / events. To get those, a class must implement the interface and be added to a list of "Targets". See: ILoadBalancingCallbacks.
  62. Added: RegionHandler, which provides methods to ping a list of regions and to find the one with best ping. This moves PUN's "Best Region" feature to the LoadBalancing API.
  63. Moved: The PhotonPing was part of the dll but is now part of LoadBalancing.
  64. Added: LoadBalancingClient.UseAlternativeUdpPorts. This way, UDP may use ports of the Steam Multiplayer port-range by simply replacing existing port strings in addresses.
  65. Changed: RaiseEvent now has an overload, that uses RaiseEventOptions and SendOptions. The old variant is obsolete but will still work.
  66. Changed: CheckUserOnJoin is now set by default. The RoomOptions.CheckUserOnJoin got removed.
  67. Added: Client-side checks and limits for OpFindFriends.
  68. Added: Optional parameter sendAuthCookie to OpLeaveRoom. The app can control what's passed from Photon to a server via WebHook.
  69. Changes: The room list for lobbies is no longer part of the LoadBalancingClient. Instead, implement the callback for the changed room list.
  70. Added: AppSettings, a base class to host AppId and some settings for a title. This will help make it available across products. Right now, the LoadBalancingClient is not using it yet.
  71. Changed: Player.ID is now .ActorNumber, which mirrors the server's naming.
  72. Fixed: Unity compile defines to support Unity 2018,
  73. Version 4.1.1.18 (19. December 2017 - rev4540)
  74. Changed: FriendInfo.Name is now "UserId", which is up to date with it's usage.
  75. Changed: CheckUserOnJoin is now set by default. The RoomOptions.CheckUserOnJoin got removed.
  76. Version 4.1.1.17 (11. October 2017 - rev4465)
  77. Changed: OperationCode const byte Join = 255 is now marked obsolete. We use "JoinGame" instead.
  78. Added: DisconnectCause.AuthenticationTicketExpired.
  79. Fixed: DebugReturn call in Unity WebGL.
  80. Version 4.1.1.15 (17. July 2017 - rev4232)
  81. Added: LoadBalancingClient.TransportProtocol as shortcut to the use PhotonPeer's TransportProtocol value. This enables setting the protocol easily while not connected.
  82. Added: LoadBalancingClient.SocketImplementationConfig as shortcut to modify PhotonPeer's SocketImplementationConfig. This enables you to setup which IPhotonSocket implementation to use for which network protocol.
  83. Changed: LoadBalancingPeer.ConfigUnitySockets() to try to find our websocket implementations in the assembly, making the SocketWebTcpCoroutine and SocketWebTcpThread classes optional.
  84. Removed: Class "SocketWebTcp" is no longer found by ConfigUnitySockets().
  85. Version 4.1.1.14 (5. July 2017 - rev4191)
  86. Changed: The ClientState "Uninitialized" is now "PeerCreated". This is the initial state. ConnectedToMaster is now ConnectedToMasterserver (both use the same value).
  87. Updated: ClientState values descriptions.
  88. Internal: GameEnteredOnGameServer() first sets the local player's actorNumber, then updates the player lists.
  89. Version 4.1.1.8 (24. February 2017 - rev3873)
  90. Added: Player.UserId field and code to read published UserIds from the player properties in CacheProperties(). When publishing the UserId in a room (RoomOptions.PublishUserId = true), the UserId becomes available for all players in a room. Good to find/make friends or follow a team player into another room.
  91. Added: New matchmaking operation: OpGetGameList(typedLobby, sqlFilter). This fetches a list of rooms that match the filter. You can show lists of rooms with specific properties, if needed (or still use OpJoinRandom).
  92. Fixed: WebFlags properties setters.
  93. Version 4.1.1.7 (16. December 2016)
  94. Fixed: Demos with persistent (Turnbased) games. The Memory Demo was not setting up rooms correctly (which led to errors joining them) and used a "join" rather than a "rejoin" to get into saved games (getting added to the room once more).
  95. Version 4.1.1.6 (9. December 2016 - rev3801)
  96. Added: OpJoinRandom will now "remember" to send ExpectedUsers to the Game Server (by caching the value).
  97. Added: AuthEvent and it's handling. This (internally sent) event can now update the client's token anytime (before that expires).
  98. Added: LoadBalancingClient.OpChangeGroups().
  99. Changed: LoadBalancingClient.Disconnect() no longer sets it's own State to Disconnected. It waits till the state-change callback gets called by the lib.
  100. Version 4.1.1.2 (13. September 2016 - rev3652)
  101. Removed: LoadBalancingClient.PlayerName and Player.Name. Were obsolete for more than a year. There is a NickName and the UserId can be set in the AuthValues.
  102. Removed: OpJoinRoom() overload with actorNumber. This was obsolete. To enable clients to return to a room, set AuthValues and a userID.
  103. Changed: LoadBalancingClient no longer overrides the protocol for Unity WebGL. This is done in the LoadBalancingPeer.ConfigUnitySockets().
  104. Changed: GetNameServerAddress() is the same in Chat and LoadBalancing APIs now.
  105. Added: DisconnectCause.DisconnectByServerLogic and handling for this case. You can check this DisconnectedCause when the LoadBalancingClient.State is ClientState.Disconnected.
  106. Added: Hashtable definition to use Photon's own implementation for Windows Store builds (NETFX_CORE). This must be used but it means you to use the same Hashtable definition in all builds (no matter if 8.1 or 10).
  107. Added: Support for WebGL export in Unity.
  108. Changed: OnStateChangeAction, OnEventAction and OnOpResponseAction are now events. To register a method in one of those, use += and to deregister you need to use -=. This prevents assigning a new method and de-registering any previously registered ones.
  109. Version 4.1.1.0 (15. August 2016 - rev3536)
  110. Fixed: Room.ClearExpectedUsers() is now sending it's current, local "expected users" to update the server with "CAS" (Check and Swap). This gives the client an update when the values become valid (which updates the local cache after the roundtrip).
  111. Added: Support for the 'Server Side Master Client' feature. The Room will read master client updates from the server accordingly. Room.SetMasterClient() enables you to override the server's selection (provided it did not change before your operation gets executed).
  112. Changed: Option for bool WebForward into the new "WebFlags". This allows fine control of which data is being sent to WebHooks. This affects all SetProperties, OpWebRPC and the RaiseEventOptions.
  113. Added: WebRPC.cs to the LoadBalancing API folder (was available separately before). It contains WebFlags and WebRpcResponse.
  114. Version 4.1.0.6 (21. June 2016 - rev3376)
  115. Fixed: LoadBalancingPeer.OpRaiseEvent(...) to send operations (and events) unencrypted again.
  116. Version 4.1.0.2 (21. April 2016 - rev3283)
  117. Added: Expected Users. This affects the Room, LoadBalancingClient, JoinRoom, JoinOrCreateRoom and CreateRoom.
  118. Added: null check in Extensions.StripToStringKeys().
  119. Fixed: FriendInfo.IsInRoom, which returned the opposite of it's naming! Also changed FriendInfo ToString() according to PUN's.
  120. Added: RoomInfo expectedUsersField, which is updated with room properties (well known ones).
  121. Added: Room.ExpectedUsers and ClearExpectedUsers() to expose the list of expected players.
  122. Added: RoomInfo.serverSideMasterClient and masterClientIdField (also updated with well known properties).
  123. Changed: OpRaiseEvent now re-uses a Dictionary in the LoadBalancingPeer. It uses Clear(), rather than creating a new Dict each time.
  124. Changed: AuthenticationValues to also use C# properties and and backup-fields. This is guaranteed to work in Unity.
  125. Updated: EventCode ErrorInfo reference with a link to "WebHooks" doc online.
  126. Changed: Disconnect handling in the LoadBalancingClient. The client should reset correctly and log info, if it's in a State where a disconnect is a proper error. Note: In some cases like "switching server", a disconnect is expected, so it's not an error then.
  127. Fixed: PlayerProperties sent to game server will now include well-known properties again. This fixes the "NickName missing" bug.
  128. Fixed: LoadBalancingClient.State value when the client fails to join or create a game on the Master Server. The state is correctly re-set to ClientState.JoinedLobby or ClientState.ConnectedToMaster.
  129. Internal: Added private inLobby value, to store if the client was/is in a lobby on the Master Server.
  130. Fixed: DemoClient (in demo-loadbalancing) now makes use of the Name Server by using: ConnectToRegionMaster("eu").
  131. Added: DemoClient now has debug output when the connection times out or can't be established.
  132. Version 4.0.5.1 (18. January 2016 - rev3187)
  133. Added: OpSetCustomPropertiesOfActor() and OpSetCustomPropertiesOfRoom() now check locally, if the client is currently in a room. It must be, to be able to set these properties. An exception exists for setting properties for the local player's actorNumber, but those are better set via LoadBalancingClient.LocalPlayer.
  134. Version 4.0.0.11 (28. October 2015 - rev3093)
  135. Added: LeaveLobby handling in OnOperationResponse(), which sets the client's state correctly.
  136. Changed: Order of execution for Ev Join. If user is known (inactive user rejoins), the player's props are read. The actor list is used, if available.
  137. Changed: RoomOptions to use properties with backup-fields to avoid issues in Unity which has issues with Object Initializer (curly brackets).
  138. Changed: JoinMode 2 is now "JoinOrRejoin". Was: "Rejoin".
  139. Added: ErrorCode constant AuthenticationTicketExpired.
  140. Internal: OpJoinRoom, OpCreateRoom and OpJoinRandomRoom no longer use a (growing) list of properties. Instead, classes were created to "sum up" their parameters. The api for games didn't change.
  141. Internal: Related to the refactoring of Join/Create, the LoadBalancingClient now creates a Room instance when the client arrived on the GameServer (before, it got created in the initial "create" call).
  142. Version 4.0.0.10 (14. July 2015 - rev2988)
  143. Updated: Description for IsConnectedAndReady.
  144. Changed: NameServerAddress to return a fitting address depending on protocol (including WebSocket but not yet RHTTP).
  145. Updated: The only name server host is now "ns.exitgames.com", which gets turned into a proper address by protocol.
  146. Changed: LoadBalancingClient.CustomAuthenticationValues is now .AuthValues. You can use those values to identify a user, even if you don't setup an external, custom authentication service.
  147. Changed: LoadBalancingClient.UserId no longer directly stores the id but puts it into AuthValues. This means, the UserId could also be set via setting AuthValues.
  148. Changed: The API of AuthenticationValues. There is now the UserId and AddAuthParameter() replaces the less general SetAuthParameters() (which only set specific key/values).
  149. Changed: PlayerName gets renamed to NickName, so PhotonPlayer.Name becomes .NickName and LoadBalancingClient.Name becomes .NickName, too. The old naming is marked as obsolete.
  150. Changed: Particle Demo now connects to the Cloud by default (because it's easier to setup and try). You can define your own Master Server (Photon OnPremise) of course.
  151. Added: GamePropertyKey.MasterClientId (248) and ParameterCode.MasterClientId (203)
  152. Added: ParameterCode.ExpectedValues (231)
  153. Added: ParameterCode.SuppressRoomEvents (237)
  154. Version 4.0.0.6 (05. December 2014 - rev2758)
  155. Added: LoadBalancingClient.OpJoinOrCreateRoom overload which has lobby as parameter. If a room gets created, this defines in which lobby it belongs.
  156. Changed: LoadBalancingPeer: Added new error code PluginMismatch, documentation for Plugins parameter code.
  157. Version 4.0.0.1 (17. June 2014 - rev2663)
  158. Added: LoadBalancingClient.OpRaiseEvent(). Now that LoadBalancingClient USES a loadBalancingPeer (and doesn't extend it), things are much easier by offering this method, too!
  159. Added: LoadBalancingClient.IsConnected and .IsConnectedAndReady to LB API. Going to be part of the API from now on.
  160. Removed: Unused fields clientId and clientCount.
  161. Changed: Field for internal use "lastJoinActorNumber" is now private as intended.
  162. Changed: LoadBalancingClient.Disconnect is now setting it's own state to Disconnected if the connection got closed (as expected).
  163. Version 4.0.0.0 (23. May 2014 - rev2614)
  164. Changed: LoadBalancingClient.FriendList creation/update is delayed until the server's response is available. This avoids cases where the friends are offline for the moment between requesting the update and getting it. Initially, it is null as before.
  165. Added: some methods to Player to find next player, etc. Useful for turnbased games to find an opponent.
  166. Added: LoadBalancingClient.UserId, which is the ID of a user(account). This is used in FindFriends and when you fetch account-related data (like save-games for Turnbased games). Set it before Connect*(). As fallback when empty during connect, the PlayerName is used instead.
  167. Removed: LoadBalancingPeer.OpSetCustomPropertiesOfActor and OpSetPropertyOfRoom which were too special to be so low level. Could be implemented to LBClient.
  168. Fixed: OpJoinRandomRoom and OpCreateRoom which didn't reset the ActorNr to claim when entering the room. Depending on previous actions, some calls of those methods did fail when the actorNumber wasn't available.
  169. Changed: OperationCode.Rpc is now called OperationCode.WebRpc. It's simply much cleaner (considering PUN has RPCs as well but in a different context).
  170. Changed: WebRpcResponse reading to be able to handle additional data.
  171. Added: Parameter webForward to: OpSetCustomPropertiesOfRoom and OpSetPropertiesOfRoom. The "old" overloads of these methods are still there, too. If webForward is true, the properties are sent to the WebHooks.