[Plugin] Photon Cloud

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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

  • aminhanifm

    Which exact Photon example do you use? What is the name of the function? Do you have any errors or something does not work as expected?

  • aminhanifm

    Which exact Photon example do you use? What is the name of the function? Do you have any errors or something does not work as expected?

    I am using Demo-pool Photon example, the name of the function is createFish, i don't get any errors but if i change the position of creating fish to random then if there's new player joined, the new player will be created on randomed place on my screen then it moving until the new player get into the real position, and the new player's screen is also creating my fish to a random position and it moving to my real position.

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