[Plugin] Photon Cloud

  • Your distance implementation is severely lacking in oversight, none of the players will see each-other and so have nothing to calculate distance with. Hence interest groups. For instance groups, you can send your location to rounding your position to the nearest like 256 multiple or seomthing , and then choosing the nearest 8 cells, looking up the cell's interest zone in a dictionary that you made by indexing all of the possible cells, putting those interest zones when you send your event.

    Then comes the hard part of creating and deleting players when you enter new interest zones and leave them and looking up their player data and appearance without having everyone pop in and out of existence and making sure someone isn't out of another player'S interest zone and attempting to shoot at them offscreen but not creating any bullets or things like that

    None of the players would see each other if the data area is small,but if the data area is big enough to cover the players screen then expand outwards a little bit it should be fine,since the players would pop into the users interest area before appearing directly on screen,thus preventing players just popping in and out of the users active view range

  • ThePhotons Will we be able to get access to the self hosted variable via the eventsheet in the future? with the current set up you can only connect to one server unless you build multiple games just for a location so i dont think that'd work in full on production.

    And i read that

    [quote:9t5de3sa]Several client libraries have built-in "Network Traffic Stats" that should help you to answer these questions.

    will that also be available for js/c2 ?

  • > Phacanu digitalsoapbox

    > Another option may be dividing game field in interest areas and assigning interest group to each. Subscribe player to interest group as he enters and unsubscribe as he leaves the area ("Change groups" action). In event, specify interest group which area better matches player position.

    >

    That seems like it would be more useful for something like a board game where interest groups would be more likely to remain static than what was being asked about, which is more about selecting remote Player objects around the local Player's position. Unless I'm missing something? Does dividing the playfield by interest areas also work dynamically? I haven't spent much time w/ interest areas so any additional insight would be appreciated.

    Interest groups is the way of sending data to a group of players w/o explicitly specifying players ids in event. You can group player by any parameter including position. Dynamic interest areas (with interest groups mapped to areas) is also possible of course. The question is how do you update groups subscriptions dynamically. In case of static areas, player subscribes or unsubscribes as he changes position. That way, he does not need to know other players positions.

  • ThePhotons

    Pretty cool! I haven't played w/ dynamic interest areas yet, sounds useful.

  • Deleted the content since my problem was fixed

  • ThePhotons Will we be able to get access to the self hosted variable via the eventsheet in the future? with the current set up you can only connect to one server unless you build multiple games just for a location so i dont think that'd work in full on production.

    And i read that

    [quote:2nlfmczy]Several client libraries have built-in "Network Traffic Stats" that should help you to answer these questions.

    will that also be available for js/c2 ?

    We will add runtime access to self-hosted variables this week I hope.

    Traffic stats are not supported by underlying js Photon library. It's possible that we will add such support in the library but it's not expected to happen soon.

  • ThePhotons i would also like a little more insight into interest groups,the example capx are good and they cover about everything except interest groups

    Interest groups are quite simple. If you specified group in event, only clients subscribed to this group will receive the event.

    Use Change Groups action to subscribe and unsubscribe.

  • ThePhotons For the past few days, I've been trying to get WSS working on my test server.

    I managed to get SSL and all working fine for this testing domain with the help of https://letsencrypt.org/ I bought, https://photonssl.science/, I'm able to connect to the server via WebSockets using ws://photonssl.science:9090.When I attempted to just outright connect to the servers WSS port it resulted in an error so I went to https://doc.photonengine.com/en-us/onpremise/current/operations/websockets-ssl-setup in hopes of finding a solution to this problem, I've been reading the documentation over and over and I still don't know exactly what I'm doing wrong,And I've searched the forums only to find dead ends or posts so old that different onpremise versions might render the answers useless,If it wouldnt be too much of a trouble to help me out with this here are the full configs that im currently using

    PhotonServer.config

    <?xml version="1.0" encoding="Windows-1252"?>
    <!--
    	(c) 2015 by Exit Games GmbH, 

    exitgames.com[/p] Photon server configuration file.[/p] For details see the photon-config.pdf.[/p] [/p] This file contains two configurations:[/p] [/p] "LoadBalancing"[/p] Loadbalanced setup for local development: A Master-server and a game-server.[/p] Starts the apps: Game, Master, CounterPublisher[/p] Listens: udp-port 5055, tcp-port: 4530, 843 and 943 [/p] [/p] -->[/p] [/p] <Configuration>[/p] <!-- Multiple instances are supported. Each instance has its own node in the config file. -->[/p] [/p] <LoadBalancing[/p] MaxMessageSize="512000"[/p] MaxQueuedDataPerPeer="512000"[/p] PerPeerMaxReliableDataInTransit="51200"[/p] PerPeerTransmitRateLimitKBSec="256"[/p] PerPeerTransmitRatePeriodMilliseconds="200"[/p] MinimumTimeout="5000"[/p] MaximumTimeout="30000"[/p] DisplayName="LoadBalancing (MyCloud)">[/p] [/p] <!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. -->[/p] <!-- Port 5055 is Photon's default for UDP connections. -->[/p] <UDPListeners>[/p] <UDPListener[/p] IPAddress="0.0.0.0"[/p] Port="5055"[/p] OverrideApplication="Master">[/p] </UDPListener>[/p] <UDPListener[/p] IPAddress="0.0.0.0"[/p] Port="5056"[/p] OverrideApplication="Game">[/p] </UDPListener>[/p] [/p] </UDPListeners>[/p] [/p] <!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. --> [/p] <TCPListeners>[/p] <!-- TCP listener for Game clients on Master application -->[/p] <TCPListener[/p] IPAddress="0.0.0.0"[/p] Port="4530"[/p] OverrideApplication="Master"[/p] PolicyFile="Policy\assets\socket-policy.xml"[/p] InactivityTimeout="10000"[/p] >[/p] </TCPListener>[/p] [/p] <TCPListener[/p] IPAddress="0.0.0.0"[/p] Port="4531"[/p] OverrideApplication="Game"[/p] PolicyFile="Policy\assets\socket-policy.xml"[/p] InactivityTimeout="10000">[/p] </TCPListener>[/p] [/p] <!-- DON'T EDIT THIS. TCP listener for GameServers on Master application -->[/p] <TCPListener[/p] IPAddress="0.0.0.0"[/p] Port="4520">[/p] </TCPListener>[/p] </TCPListeners>[/p] [/p] <!-- Policy request listener for Unity and Flash (port 843) and Silverlight (port 943) -->[/p] <PolicyFileListeners>[/p] <!-- multiple Listeners allowed for different ports -->[/p] <PolicyFileListener[/p] IPAddress="0.0.0.0"[/p] Port="843"[/p] PolicyFile="Policy\assets\socket-policy.xml">[/p] </PolicyFileListener>[/p] <PolicyFileListener[/p] IPAddress="0.0.0.0"[/p] Port="943"[/p] PolicyFile="Policy\assets\socket-policy-silverlight.xml">[/p] </PolicyFileListener>[/p] </PolicyFileListeners>[/p] [/p] [/p] <!-- WebSocket (and Flash-Fallback) compatible listener -->[/p] <WebSocketListeners>[/p] <WebSocketListener[/p] IPAddress="45.32.221.12"[/p] Port="19090"[/p] DisableNagle="true"[/p] InactivityTimeout="10000"[/p] OverrideApplication="Master"[/p] Secure = "true"[/p] StoreName = "My"[/p] CertificateName = "photonssl.science"[/p] UseMachineStore = "true">[/p] </WebSocketListener>[/p] <WebSocketListener[/p] IPAddress="45.32.221.12"[/p] Port="19091"[/p] DisableNagle="true"[/p] InactivityTimeout="10000"[/p] OverrideApplication="Game"[/p] Secure = "true"[/p] StoreName = "My"[/p] CertificateName = "photonssl.science"[/p] UseMachineStore = "true"> [/p] </WebSocketListener>[/p] </WebSocketListeners>[/p] [/p] <!-- Defines the Photon Runtime Assembly to use. -->[/p] <Runtime[/p] Assembly="PhotonHostRuntime, Culture=neutral"[/p] Type="PhotonHostRuntime.PhotonDomainManager"[/p] UnhandledExceptionPolicy="Ignore">[/p] </Runtime>[/p] [/p] <!-- Defines which applications are loaded on start and which of them is used by default. Make sure the default application is defined. -->[/p] <!-- Application-folders must be located in the same folder as the bin_win32 folders. The BaseDirectory must include a "bin" folder. -->[/p] <Applications Default="Master"> [/p] <Application[/p] Name="Master"[/p] BaseDirectory="LoadBalancing\Master"[/p] Assembly="Photon.LoadBalancing"[/p] Type="Photon.LoadBalancing.MasterServer.MasterApplication"[/p] ForceAutoRestart="true"[/p] WatchFiles="dll;config"[/p] ExcludeFiles="log4net.config"[/p] >[/p] </Application>[/p] <Application[/p] Name="Game"[/p] BaseDirectory="LoadBalancing\GameServer"[/p] Assembly="Photon.LoadBalancing"[/p] Type="Photon.LoadBalancing.GameServer.GameApplication"[/p] ForceAutoRestart="true"[/p] WatchFiles="dll;config"[/p] ExcludeFiles="log4net.config">[/p] </Application>[/p] [/p] <!-- CounterPublisher Application -->[/p] <Application[/p] Name="CounterPublisher"[/p] BaseDirectory="CounterPublisher"[/p] Assembly="CounterPublisher"[/p] Type="Photon.CounterPublisher.Application"[/p] ForceAutoRestart="true"[/p] WatchFiles="dll;config"[/p] ExcludeFiles="log4net.config">[/p] </Application> [/p] </Applications>[/p] </LoadBalancing> [/p] [/p] [/p] [/p] <!-- Instance settings -->[/p] <MMoDemo[/p] MaxMessageSize="512000"[/p] MaxQueuedDataPerPeer="512000"[/p] PerPeerMaxReliableDataInTransit="51200"[/p] PerPeerTransmitRateLimitKBSec="256"[/p] PerPeerTransmitRatePeriodMilliseconds="200"[/p] MinimumTimeout="5000"[/p] MaximumTimeout="30000"[/p] DisplayName="MMO Demo"[/p] >[/p] [/p] <!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. -->[/p] <!-- Port 5055 is Photon's default for UDP connections. -->[/p] <UDPListeners>[/p] <UDPListener[/p] IPAddress="0.0.0.0"[/p] Port="5055"[/p] OverrideApplication="MMoDemo">[/p] </UDPListener>[/p] </UDPListeners>[/p] [/p] <!-- 0.0.0.0 opens listeners on all available IPs. Machines with multiple IPs should define the correct one here. -->[/p] <!-- Port 4530 is Photon's default for TCP connecttions. -->[/p] <!-- A Policy application is defined in case that policy requests are sent to this listener (known bug of some some flash clients) --> [/p] <TCPListeners>[/p] <TCPListener[/p] IPAddress="0.0.0.0"[/p] Port="4530"[/p] PolicyFile="Policy\assets\socket-policy.xml"[/p] InactivityTimeout="10000"[/p] OverrideApplication="MMoDemo" [/p] >[/p] </TCPListener>[/p] </TCPListeners>[/p] [/p] <!-- Policy request listener for Unity and Flash (port 843) and Silverlight (port 943) -->[/p] <PolicyFileListeners>[/p] <!-- multiple Listeners allowed for different ports -->[/p] <PolicyFileListener[/p] IPAddress="0.0.0.0"[/p] Port="843"[/p] PolicyFile="Policy\assets\socket-policy.xml"[/p] InactivityTimeout="10000">[/p] </PolicyFileListener>[/p] <PolicyFileListener[/p] IPAddress="0.0.0.0"[/p] Port="943"[/p] PolicyFile="Policy\assets\socket-policy-silverlight.xml"[/p] InactivityTimeout="10000">[/p] </PolicyFileListener>[/p] </PolicyFileListeners>[/p] [/p] <!-- WebSocket (and Flash-Fallback) compatible listener -->[/p] <WebSocketListeners>[/p] <WebSocketListener[/p] IPAddress="0.0.0.0"[/p] Port="9090"[/p] DisableNagle="true"[/p] InactivityTimeout="10000"[/p] OverrideApplication="MMoDemo">[/p] </WebSocketListener>[/p] </WebSocketListeners>[/p] [/p] <!-- Defines the Photon Runtime Assembly to use. -->[/p] <Runtime[/p] Assembly="PhotonHostRuntime, Culture=neutral"[/p] Type="PhotonHostRuntime.PhotonDomainManager"[/p] UnhandledExceptionPolicy="Ignore">[/p] </Runtime>[/p] [/p] [/p] <!-- Defines which applications are loaded on start and which of them is used by default. Make sure the default application is defined. -->[/p] <!-- Application-folders must be located in the same folder as the bin_win32 folders. The BaseDirectory must include a "bin" folder. -->[/p] <Applications Default="MMoDemo">[/p] [/p] <!-- MMO Demo Application -->[/p] <Application[/p] Name="MMoDemo"[/p] BaseDirectory="MmoDemo"[/p] Assembly="Photon.MmoDemo.Server"[/p] Type="Photon.MmoDemo.Server.PhotonApplication"[/p] ForceAutoRestart="true"[/p] WatchFiles="dll;config"[/p] ExcludeFiles="log4net.config">[/p] </Application>[/p] [/p] <!-- CounterPublisher Application -->[/p] <Application[/p] Name="CounterPublisher"[/p] BaseDirectory="CounterPublisher"[/p] Assembly="CounterPublisher"[/p] Type="Photon.CounterPublisher.Application"[/p] ForceAutoRestart="true"[/p] WatchFiles="dll;config"[/p] ExcludeFiles="log4net.config">[/p] </Application> [/p] [/p] </Applications>[/p] </MMoDemo>[/p] [/p] </Configuration>[/p] [/code:gdo1ezrr][/p] [b]Photon.LoadBalancing.dll.config[/p] [/b][/p] [code:gdo1ezrr][/p] <?xml version="1.0"?>[/p] [/p] <configuration>[/p] <configSections>[/p] <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">[/p] <section name="Photon.LoadBalancing.Common.CommonSettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />[/p] <section name="Photon.LoadBalancing.GameServer.GameServerSettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />[/p] <section name="Photon.LoadBalancing.MasterServer.MasterServerSettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />[/p] <section name="Photon.Common.Authentication.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />[/p] </sectionGroup>[/p] <section name="Photon" type="Photon.SocketServer.Diagnostics.Configuration.PhotonSettings, Photon.SocketServer" />[/p] <section name="PluginSettings" type="Photon.Hive.Configuration.PluginSettings, PhotonHive" />[/p] <section name="WebRpcSettings" type="Photon.Hive.WebRpc.Configuration.WebRpcSettings, PhotonHive" />[/p] <section name="AuthSettings" type="Photon.Common.Authentication.Configuration.Auth.AuthSettings, Photon.Common" />[/p] </configSections>[/p] <applicationSettings>[/p] [/p] <Photon.LoadBalancing.Common.CommonSettings>[/p] <setting name="NodesFileName" serializeAs="String">[/p] <value>Nodes.txt</value>[/p] </setting>[/p] <setting name="NodesFilePath" serializeAs="String">[/p] <value>..\..\</value>[/p] </setting>[/p] <setting name="EnablePerformanceCounters" serializeAs="String">[/p] <value>True</value>[/p] </setting>[/p] </Photon.LoadBalancing.Common.CommonSettings>[/p] [/p] <Photon.Common.Authentication.Settings>[/p] <setting name="AuthCacheUpdateInterval" serializeAs="String">[/p] <value>300</value>[/p] </setting>[/p] [/p] <setting name="AuthTokenKey" serializeAs="String">[/p] <value>76B2814E-2A50-4E29-838A-20411D335FC9</value>[/p] </setting>[/p] [/p] <setting name="AuthTokenExpiration" serializeAs="String">[/p] <value>10000</value>[/p] </setting>[/p] [/p] <!-- Custom Authentication Queue Settings -->[/p] <setting name="MaxConcurrentRequests" serializeAs="String">[/p] <value>50</value>[/p] </setting>[/p] <setting name="MaxQueuedRequests" serializeAs="String">[/p] <value>5000</value>[/p] </setting>[/p] <setting name="MaxErrorRequests" serializeAs="String">[/p] <value>10</value>[/p] </setting>[/p] <setting name="MaxTimedOutRequests" serializeAs="String">[/p] <value>10</value>[/p] </setting>[/p] <setting name="HttpRequestTimeoutMS" serializeAs="String">[/p] <value>30000</value>[/p] </setting>[/p] <setting name="ReconnectIntervalS" serializeAs="String">[/p] <value>60</value>[/p] </setting>[/p] <setting name="QueueTimeoutS" serializeAs="String">[/p] <value>20</value>[/p] </setting>[/p] <setting name="MaxBackoffTimeInMiliseconds" serializeAs="String">[/p] <value>10000</value>[/p] </setting>[/p] </Photon.Common.Authentication.Settings>[/p] [/p] <Photon.LoadBalancing.GameServer.GameServerSettings>[/p] <setting name="AppStatsPublishInterval" serializeAs="String">[/p] <value>1000</value>[/p] </setting>[/p] <!-- GameServer-to-Master connections. -->[/p] <setting name="ConnectReytryInterval" serializeAs="String">[/p] <value>15</value>[/p] </setting>[/p] <setting name="EnableNamedPipe" serializeAs="String">[/p] <value>False</value>[/p] </setting>[/p] <!-- Path for Client-to-Gameserver HTTP connections -->[/p] <setting name="GamingHttpPath" serializeAs="String">[/p] <value>photon/g</value>[/p] </setting>[/p] <!-- Client-to-Gameserver HTTP connections. Needs to match the RHTTPListener in PhotonServer.config -->[/p] <setting name="GamingHttpPort" serializeAs="String">[/p] <value>80</value>[/p] </setting>[/p] <!-- Client-to-Gameserver HTTPS connections. Needs to match the RHTTPListener in PhotonServer.config -->[/p] <setting name="GamingHttpsPort" serializeAs="String">[/p] <value>443</value>[/p] </setting>[/p] <!-- Client-to-Gameserver Secure WebSocket connections. Needs to match the secure WebSocketListener in PhotonServer.config -->[/p] <setting name="GamingSecureWebSocketPort" serializeAs="String">[/p] <value>19090</value>[/p] </setting>[/p] <!-- Client-to-Gameserver TCP connections. Needs to match the TCPListener in PhotonServer.config -->[/p] <setting name="GamingTcpPort" serializeAs="String">[/p] <value>4531</value>[/p] </setting>[/p] <!-- Client-to-Gameserver UDP connections. Needs to match the UDPListener in PhotonServer.config -->[/p] <setting name="GamingUdpPort" serializeAs="String">[/p] <value>5056</value>[/p] </setting>[/p] <!-- Client-to-Gameserver WebSocket connections. Needs to match the WebSocketListener in PhotonServer.config -->[/p] <setting name="GamingWebSocketPort" serializeAs="String">[/p] <value>9091</value>[/p] </setting>[/p] <setting name="HttpQueueMaxErrors" serializeAs="String">[/p] <value>30</value>[/p] </setting>[/p] <setting name="HttpQueueMaxTimeouts" serializeAs="String">[/p] <value>30</value>[/p] </setting>[/p] <setting name="HttpQueueRequestTimeout" serializeAs="String">[/p] <value>30000</value>[/p] </setting>[/p] <setting name="HttpQueueMaxBackoffTime" serializeAs="String">[/p] <value>10000</value>[/p] </setting>[/p] <setting name="HttpQueueMaxQueuedRequests" serializeAs="String">[/p] <value>5000</value>[/p] </setting>[/p] <setting name="HttpQueueQueueTimeout" serializeAs="String">[/p] <value>90000</value>[/p] </setting>[/p] <setting name="HttpQueueReconnectInterval" serializeAs="String">[/p] <value>60000</value>[/p] </setting>[/p] <setting name="HttpQueueMaxConcurrentRequests" serializeAs="String">[/p] <value>1</value>[/p] </setting>[/p] <setting name="LastTouchCheckIntervalSeconds" serializeAs="String">[/p] <value>60</value>[/p] </setting>[/p] <setting name="LastTouchSecondsDisconnect" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <!-- Set to the IP Address of the Photon instance where your Master application is running. -->[/p] <setting name="MasterIPAddress" serializeAs="String">[/p] <value>45.32.221.12</value>[/p] </setting>[/p] <setting name="MaxEmptyRoomTTL" serializeAs="String">[/p] <value>60000</value>[/p] </setting>[/p] <!-- Gameserver-to-Master connections. -->[/p] <setting name="OutgoingMasterServerPeerPort" serializeAs="String">[/p] <value>4520</value>[/p] </setting>[/p] <setting name="PublicIPAddress" serializeAs="String">[/p] <value>45.32.221.12</value>[/p] </setting>[/p] <setting name="PublicIPAddressIPv6" serializeAs="String">[/p] <value></value>[/p] </setting>[/p] <!-- the hostname for this gameserver. Required for HTTP & websocket connections. Change it to a useful entry, like hostname.mydomain.com, for a production scenario. -->[/p] <setting name="PublicHostName" serializeAs="String">[/p] <!--<value>%COMPUTERNAME%.mydomain.com</value>-->[/p] <value>photonssl.science</value>[/p] </setting>[/p] [/p] <!-- The domain name for this gameserver. Required for websocket connections and needs to match the certificate for secure websocket / https connections. [/p] For example: mydomain.com -->[/p] <setting name="PublicDomainName" serializeAs="String">[/p] <value>photonssl.science</value>[/p] </setting>[/p] <setting name="RelayPortHttp" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="RelayPortSecureWebSocket" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="RelayPortTcp" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="RelayPortUdp" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="RelayPortWebSocket" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="ServerStateFile" serializeAs="String">[/p] <value>ServerState.txt</value>[/p] </setting>[/p] <setting name="WorkloadConfigFile" serializeAs="String">[/p] <value>Workload.config</value>[/p] </setting>[/p] </Photon.LoadBalancing.GameServer.GameServerSettings>[/p] [/p] <Photon.LoadBalancing.MasterServer.MasterServerSettings>[/p] <setting name="AppStatsPublishInterval" serializeAs="String">[/p] <value>5000</value>[/p] </setting>[/p] <setting name="EnableProxyConnections" serializeAs="String">[/p] <value>False</value>[/p] </setting>[/p] <setting name="GameChangesPublishInterval" serializeAs="String">[/p] <value>1000</value>[/p] </setting>[/p] <setting name="GameExpiryCheckPeriod" serializeAs="String">[/p] <value>1</value>[/p] </setting>[/p] <setting name="GameListLimit" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <!-- Gameserver-to-Master connections. Needs to match the TCPListener in PhotonServer.config -->[/p] <setting name="IncomingGameServerPeerPort" serializeAs="String">[/p] <value>4520</value>[/p] </setting>[/p] <setting name="LobbyStatsLimit" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="LobbyStatsPublishInterval" serializeAs="String">[/p] <value>120</value>[/p] </setting>[/p] <setting name="MasterRelayPortTcp" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="MasterRelayPortUdp" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="MasterRelayPortWebSocket" serializeAs="String">[/p] <value>0</value>[/p] </setting>[/p] <setting name="PersistentGameExpiryMinute" serializeAs="String">[/p] <value>60</value>[/p] </setting>[/p] <!-- Leave empty and the the IP address will be looked up dynamically at runtime. -->[/p] <setting name="PublicIPAddress" serializeAs="String">[/p] <value>45.32.221.12</value>[/p] </setting>[/p] <setting name="RedisDB" serializeAs="String">[/p] <value />[/p] </setting>[/p] </Photon.LoadBalancing.MasterServer.MasterServerSettings>[/p] </applicationSettings>[/p] [/p] <Photon>[/p] <CounterPublisher enabled="True" updateInterval="1">[/p] <Sender endpoint="udp://255.255.255.255:40001" protocol="PhotonBinary" initialDelay="10" sendInterval="10" />[/p] </CounterPublisher>[/p] </Photon>[/p] <!-- Enable webhooks plugin by setting Enabled to "true" -->[/p] <PluginSettings Enabled="false">[/p] <Plugins>[/p] <Plugin Name="WebHooksPlugin1.2" Version="" AssemblyName="PhotonHive.WebhooksPlugin1.2.dll" Type="Photon.Hive.Plugin.WebHooks.PluginFactory" BaseUrl="http://photon-photon-pluginsdk-v1.webscript.io" IsPersistent="true" HasErrorInfo="true" PathClose="GameClose" PathCreate="GameCreate" PathEvent="GameEvent" PathGameProperties="GameProperties" PathJoin="GameJoin" PathLeave="GameLeave" PathLoad="GameCreate" />[/p] </Plugins>[/p] </PluginSettings>[/p] <!-- Enable webRPCs by setting Enabled to "true" -->[/p] <WebRpcSettings Enabled="false">[/p] <BaseUrl Value="http://photon-photon-pluginsdk-v1.webscript.io" />[/p] </WebRpcSettings>[/p] [/p] <!-- Enable Custom Authentication by setting Enabled to "true" -->[/p] <AuthSettings Enabled="false" ClientAuthenticationAllowAnonymous="true">[/p] <AuthProviders>[/p] <AuthProvider Name="Custom" AuthenticationType="0" AuthUrl="http://photon.webscript.io/auth-demo" secret="customauthsecret" />[/p] [/p] <AuthProvider Name="Facebook" AuthenticationType="2" AuthUrl="" secret="Val1" appid="Val2" />[/p] </AuthProviders>[/p] </AuthSettings>[/p] [/p] <startup>[/p] <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />[/p] </startup>[/p] </configuration>[/p] [/p] [/code:gdo1ezrr]

  • Phacanu

    Maybe this is related somehow to 2nd-level domain. CertificateName = "*.photonssl.science" looks like more conventional value.

    If you still experience problems with wss connection, please mail to developer(at)photonengine.com where server experts can help.

    Please specify exact error you have and attach client and server logs.

  • Hello!

    I haven't found anywhere anyone mentioning a problem I've been having.

    I'm making a 2-player game. I have it set up so the first player who joins the room is the master and is assigned player 1 sprite.

    The second one joining is player 2 and gets the player 2 sprite.

    Now, I have the syncing done and working, so when one player moves, the movement shows on the other players screen.

    If player 2 leaves, he can come back and get assigned the player 2 sprite again, which works just fine.

    But the problem is, his sprite's position needs to be of where he last left of.

    Since the master actor has the information of where player 2 is located since he is still in the room, I'm wondering how I could code it so Player 2 can "ask" for this information so he can be positioned correctly.

    I appreciate any help I can get.

  • adventurist when player 2 joins back raise an event say ... code 10 to others with actor.nr

    on event raised 10, if player that receives it is photon.myactor (so the master client), raise an event say code 11 to others with actor.nr that was sent from above with his X and Y

    on event raised 11, if player that receives is photon.myactor (so NOT the master client due to sending events to others) set X and Y

  • adventurist

    You can omit sending and processing event from joining client and handle "On actor join" action on master instead.

  • Hello guys !

    How can i create a player on a randomize place between Layout.Width & Layout.Height and keeps the place of joined actor, so when a player join the another player who has joined the room already on their places, not being randomized?

    I really appreciate for anyone who help me with this

  • When the second player joins the room the join room event is triggered he raises and event for others. When the raised event triggers they raise an event with info for str actor.nr that sent it to begin with. The second player now received this event from other players with their location, actornr so all you need to do here is create the sprites.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Im using photon's example, and theres a creating function which are being used for actor join and game event raises, that makes me really confused. maybe i can send you the capx if you want

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)