Photon Plugin v3.2.1.3

Hey everyone,

We just uploaded a new version of the plugin with some improvements.

There are a few breaking changes:

  • LoadBalancingClient:createRoom() optional parameters moved to table parameter ‘options’.
    See doc for details.
  • LoadBalancingClient.new() ‘initRoom’ and ‘initActor’ parameters moved to ‘options’ table parameter
  • LoadBalancingClient.new() with single table parameter is deprecated.
    See doc for details.

Improvements:

  • This version connects much faster on a range of devices.
    The bottleneck “encryption” is now done in native code. Connect times should be from 5…10 seconds down to 1…2 seconds.
  • Added PhotonPeer.serviceBasic() which you can call to measure RTT without sending a package every time. This still enables you to aggregate commands into fewer packages.
    See doc for details.

UPDATED: doc links

Is there a difference in performance whether photon is imported via the lua file provided on your site or if Corona’s plugin import is the preferred method?

The only difference is that plugin significantly faster connects to servers on devices compared to lua lib since cpu-consuming encryption calculations moved to c++ code in plugin.

Plugin import is preferred.

If for some reason you still need lua lib (for most recent features not in plugin yet e. g.), you can achieve same performance by setting encryptedAuthentication = false option in LoadBalancingClient constructor. But at the cost of safety of course.

Thanks!

Is there a difference in performance whether photon is imported via the lua file provided on your site or if Corona’s plugin import is the preferred method?

The only difference is that plugin significantly faster connects to servers on devices compared to lua lib since cpu-consuming encryption calculations moved to c++ code in plugin.

Plugin import is preferred.

If for some reason you still need lua lib (for most recent features not in plugin yet e. g.), you can achieve same performance by setting encryptedAuthentication = false option in LoadBalancingClient constructor. But at the cost of safety of course.

Thanks!

@ThePhotons

Hi, 

Is there an demo on how to use photon? The samples links on the page: http://docs.coronalabs.com/daily/plugin/photon/ are invalid. Thanks.

 

I tried to check out the docs but I get this:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Are the docs on exitgames website current?

I also wanted to say i have been trying to get the photon_corona_plugin_sample_advanced to work but the app seems to be stuck in an endless loop. The following debug statements are repeating over and over again and the simulator is barely responsive. 

 06/11/14 11:10:22 INFO Demo: Game: Connected

 06/11/14 11:10:34 INFO Demo: Game: Encryption Establishing…

 06/11/14 11:10:49 INFO Demo: Game: Encryption Established

 06/11/14 11:10:49 INFO Demo: Game: Authenticate…

 06/11/14 11:10:49 ERROR Demo: Game: Info: Server sent disconnect because of a timeout. PeerId: 7109   RTT/Variance: 118 / 55.712890625

 06/11/14 11:10:49 INFO Demo: Game: Server closed connection

 06/11/14 11:10:49 INFO Demo: State: ConnectingToGameserver -> Error

 06/11/14 11:10:49 INFO View: updatePlayerList -1=table: 06DD7DA0

 06/11/14 11:10:49 INFO Demo: State: Error -> Disconnected

 06/11/14 11:10:49 INFO View: updatePlayerList -1=table: 06DD7DA0

 06/11/14 11:10:49 ERROR Demo: 1003 Game server closed connection

 06/11/14 11:10:49 INFO Demo: State: Uninitialized -> ConnectingToMasterserver

 06/11/14 11:10:49 INFO Demo: Connecting to Master app-us.exitgamescloud.com:5055

 06/11/14 11:10:49 INFO PhotonConnect: app-us.exitgamescloud.com:5055 start connection to host

 06/11/14 11:10:49 INFO PhotonConnect: app-us.exitgamescloud.com:5055 app-us.exitgamescloud.com 5055 successful start connection

 06/11/14 11:10:50 INFO Demo: Master: Connected

 06/11/14 11:11:02 INFO Demo: Master: Encryption Establishing…

 06/11/14 11:11:17 INFO Demo: Master: Encryption Established

 06/11/14 11:11:18 INFO Demo: Master: Authenticate…

 06/11/14 11:11:18 INFO Demo: onAppStats 0  table: 07D141B8

 06/11/14 11:11:18 INFO Demo:   peerCount 0

 06/11/14 11:11:18 INFO Demo:   gameCount 0

 06/11/14 11:11:18 INFO Demo:   masterPeerCount 1

 06/11/14 11:11:18 INFO Demo: Master: Authenticated

 06/11/14 11:11:18 INFO Demo: State: ConnectingToMasterserver -> ConnectedToMaster

 06/11/14 11:11:18 INFO Demo: Master: Join Lobby nil nil …

 06/11/14 11:11:18 INFO Demo: Master: Joined to Lobby

 06/11/14 11:11:18 INFO Demo: State: ConnectedToMaster -> JoinedLobby

 06/11/14 11:11:18 INFO Demo: Join Random Room nil nil …

 06/11/14 11:11:18 INFO View: updateRoomListMenu table: 06D85C20

 06/11/14 11:11:18 INFO Demo: Master: Create Room nil nil …

 06/11/14 11:11:18 INFO Demo: Connecting to Game 162.210.198.3:5056

 06/11/14 11:11:18 INFO PhotonConnect: 162.210.198.3:5056 start connection to host

 06/11/14 11:11:18 INFO PhotonConnect: 162.210.198.3:5056 162.210.198.3 5056 successful start connection

 06/11/14 11:11:18 INFO Demo: State: JoinedLobby -> ConnectingToGameserver

 06/11/14 11:11:18 INFO Demo: Master: Disconnected

 06/11/14 11:11:19 INFO Demo: Game: Connected

Any help would be great.

I do want to mention I am using the current public build 2014.2189 on a windows 7 machine.

Chris

Chris

Please use links to modules documentation form plugin page:

http://docs.coronalabs.com/daily/plugin/photon/

For instance http://doc-api.exitgames.com/en/realtime/current/corona/doc/modules/loadbalancing.LoadBalancingClient.html is documentation for LoadBalancing module.

The same plugin page has link to current advanced sample (Particle demo): http://doc-api.exitgames.com/en/realtime/current/corona/samples/corona-plugin/photon_corona_plugin_sample_advanced.zip

@ThePhotons

Hi, 

Is there an demo on how to use photon? The samples links on the page: http://docs.coronalabs.com/daily/plugin/photon/ are invalid. Thanks.

 

I tried to check out the docs but I get this:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Are the docs on exitgames website current?

I also wanted to say i have been trying to get the photon_corona_plugin_sample_advanced to work but the app seems to be stuck in an endless loop. The following debug statements are repeating over and over again and the simulator is barely responsive. 

 06/11/14 11:10:22 INFO Demo: Game: Connected

 06/11/14 11:10:34 INFO Demo: Game: Encryption Establishing…

 06/11/14 11:10:49 INFO Demo: Game: Encryption Established

 06/11/14 11:10:49 INFO Demo: Game: Authenticate…

 06/11/14 11:10:49 ERROR Demo: Game: Info: Server sent disconnect because of a timeout. PeerId: 7109   RTT/Variance: 118 / 55.712890625

 06/11/14 11:10:49 INFO Demo: Game: Server closed connection

 06/11/14 11:10:49 INFO Demo: State: ConnectingToGameserver -> Error

 06/11/14 11:10:49 INFO View: updatePlayerList -1=table: 06DD7DA0

 06/11/14 11:10:49 INFO Demo: State: Error -> Disconnected

 06/11/14 11:10:49 INFO View: updatePlayerList -1=table: 06DD7DA0

 06/11/14 11:10:49 ERROR Demo: 1003 Game server closed connection

 06/11/14 11:10:49 INFO Demo: State: Uninitialized -> ConnectingToMasterserver

 06/11/14 11:10:49 INFO Demo: Connecting to Master app-us.exitgamescloud.com:5055

 06/11/14 11:10:49 INFO PhotonConnect: app-us.exitgamescloud.com:5055 start connection to host

 06/11/14 11:10:49 INFO PhotonConnect: app-us.exitgamescloud.com:5055 app-us.exitgamescloud.com 5055 successful start connection

 06/11/14 11:10:50 INFO Demo: Master: Connected

 06/11/14 11:11:02 INFO Demo: Master: Encryption Establishing…

 06/11/14 11:11:17 INFO Demo: Master: Encryption Established

 06/11/14 11:11:18 INFO Demo: Master: Authenticate…

 06/11/14 11:11:18 INFO Demo: onAppStats 0  table: 07D141B8

 06/11/14 11:11:18 INFO Demo:   peerCount 0

 06/11/14 11:11:18 INFO Demo:   gameCount 0

 06/11/14 11:11:18 INFO Demo:   masterPeerCount 1

 06/11/14 11:11:18 INFO Demo: Master: Authenticated

 06/11/14 11:11:18 INFO Demo: State: ConnectingToMasterserver -> ConnectedToMaster

 06/11/14 11:11:18 INFO Demo: Master: Join Lobby nil nil …

 06/11/14 11:11:18 INFO Demo: Master: Joined to Lobby

 06/11/14 11:11:18 INFO Demo: State: ConnectedToMaster -> JoinedLobby

 06/11/14 11:11:18 INFO Demo: Join Random Room nil nil …

 06/11/14 11:11:18 INFO View: updateRoomListMenu table: 06D85C20

 06/11/14 11:11:18 INFO Demo: Master: Create Room nil nil …

 06/11/14 11:11:18 INFO Demo: Connecting to Game 162.210.198.3:5056

 06/11/14 11:11:18 INFO PhotonConnect: 162.210.198.3:5056 start connection to host

 06/11/14 11:11:18 INFO PhotonConnect: 162.210.198.3:5056 162.210.198.3 5056 successful start connection

 06/11/14 11:11:18 INFO Demo: State: JoinedLobby -> ConnectingToGameserver

 06/11/14 11:11:18 INFO Demo: Master: Disconnected

 06/11/14 11:11:19 INFO Demo: Game: Connected

Any help would be great.

I do want to mention I am using the current public build 2014.2189 on a windows 7 machine.

Chris

Chris

Please use links to modules documentation form plugin page:

http://docs.coronalabs.com/daily/plugin/photon/

For instance http://doc-api.exitgames.com/en/realtime/current/corona/doc/modules/loadbalancing.LoadBalancingClient.html is documentation for LoadBalancing module.

The same plugin page has link to current advanced sample (Particle demo): http://doc-api.exitgames.com/en/realtime/current/corona/samples/corona-plugin/photon_corona_plugin_sample_advanced.zip