tell a newbie please.
Installed the last server. I installed the last PUN2 in the new unit project. Set the correct connection address in the settings 127.0.0.1:5056. But when I try to connect, I get an error
Got a unexpected Disconnect in LoadBalancingClient State: Disconnected. Server: MasterServer Trace: at Photon.Realtime.LoadBalancingClient.OnStatusChanged(StatusCode statusCode) in C:\!Unity\TestPhoton\Assets\Photon\PhotonRealtime\Code\LoadBalancingClient.cs:line 2302
at ExitGames.Client.Photon.PeerBase+<>c__DisplayClass100_0.b__0() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\PeerBase.cs:line 895
at ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\EnetPeer.cs:line 429
at ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands() in C:\Dev\photon-sdk-dotnet\PhotonDotnet\PhotonPeer.cs:line 1422
at Photon.Pun.PhotonHandler.FixedUpdate() in C:\!Unity\TestPhoton\Assets\Photon\PhotonUnityNetworking\Code\PhotonHandler.cs:line 126
UnityEngine.Debug:LogWarning(Object)
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:1814)
Photon.Realtime.LoadBalancingClient:OnStatusChanged(StatusCode) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2304)
ExitGames.Client.Photon.<>c__DisplayClass100_0:b__0() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:895)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:429)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1422)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:126)
↧
Photon server and PUN 2 samples
↧
Reset room and PlayerNr
Hi everyone.
Sorry for rude english, and I also hope post this thread right.
I need help - yo can see my problem here in gif: https://media.giphy.com/media/KyIchXJOFpSw5vOzAd/giphy.gif
As y may see - One of player join to host, may chatting, and then - can leave host. That works correctly.
But! if this left player try to re-join to the host again - it all crushed! Player will have NEW actorNr in the host room. As if there are 4 player in the room but not 3.
How I can clear actorNr list for current room?
Use Photon at Construct2.
↧
↧
How to reconnect before connection timeout?
Hello, I experience this behavior of photon server plugin:
1) I am an user in a room X (player TTL is 1sec, Room TTL 3mins)
2) the client dies (without proper disconnect)
3) I immediately try to reconnect and re-join to the same room with the same user (before connection timeout expires)
4) re-join attempt fails. related log messages on server side:
WARN Photon.Hive.HiveGame -
JoinApplyGameStateChanges: Game 'Room_sgl:gikx-syrk-n3in-nd65_Singleplayer_491705' userId 'sgl:gikx-syrk-n3in-nd65' failed to join. msg:Join failed: UserId 'sgl:gikx-syrk-n3in-nd65' already joined the specified game (JoinMode=3). -- peer:GameClientPeer: PID 15, IsConnected: True, IsDisposed: False, Last Activity: Operation 226 at UTC 10/16/2018 3:22:06 PM in Room Room_sgl:gikx-syrk-n3in-nd65_Singleplayer_491705, IP 192.168.2.55:41673,
5) join attempt fails too
WARN Photon.Hive.HiveGame -
JoinApplyGameStateChanges: Game 'Room_sgl:gikx-syrk-n3in-nd65_Singleplayer_491705' userId 'sgl:gikx-syrk-n3in-nd65' failed to join. msg:Join failed: UserId 'sgl:gikx-syrk-n3in-nd65' already joined the specified game (JoinMode=0). -- peer:GameClientPeer: PID 17, IsConnected: True, IsDisposed: False, Last Activity: Operation 226 at UTC 10/16/2018 3:22:07 PM in Room Room_sgl:gikx-syrk-n3in-nd65_Singleplayer_491705, IP 192.168.2.55:40362,
If I wait for cca 1min, the client connection timeotes and I am able to join the same room with the same user. But I need to do this BEFORE the timeout. Any suggestion?
than you
↧
Client is unable to connect to server
I am trying to find out what issues could cause this error:
ERROR-Receive issue. State: Connected. Server: 'localhost' ErrorCode: 10054 SocketErrorCode: ConnectionReset Message: An existing connection was forcibly closed by the remote host.
System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host.
When debugging the server code, I dont even see the client connection request hitting the CreatePeer on my ApplicationBase class.
↧
Guide for setting up client and server code for Photon Server
I've read all the Photon Server documentation here: https://doc.photonengine.com/en-us/server/current/getting-started/photon-server-intro
However it seems like it's just a high level overview of what Photon Server does.
Are there no full code samples and guides of everything you'd need to do to get a Unity client to connect to your own Photon server instance that's running custom server code (like NPCs)?
↧
↧
Schannel issue on Windows Server 2012 R2
Hello.
I have Photon Server instance on Windows Server 2012 R2 (amazon ec2 instance)
Every night at 00:00 AM I see peek of disconnected peers (using grafana). At the same time CPU usage graph on amazon monitoring falls down aswell. In windows event viewer I can see Schannel error (Event ID 36888) which says "A fatal alert was generated and sent to the remote endpoint. This may result in termination of the connection. The TLS protocol defined fatal error code is 10. The Windows SChannel error state is 1203."
On Photon-Loadbalancing logs I see "1628: 23:56:50.476 - CTCPSocketServer::OnError() - TAsyncSocket::Shutdown() - An existing connection was forcibly closed by the remote host."
Should I make something with Photon Server configs or should I fix this issue somewhere on Windows configs?
Will be much appreciated for any help
↧
call peer.disconnect right after peer.opcustom
what is the best way to send player a message and then disconnect them right the way? do I need to create a timer to wait for a few seconds to make sure the message is sent or engine will execute in order ?
eg:
peer.opcustom("message"); // is this 100% going to happen ?
peer.disconnect(); // at client side, is this 100% going to happen after receive the message ?
↧
How do Photon Server handles unreliable packets?
Hi, I'm implementing delta compression for my game, I want to know more about how do Photon Server handles the unreliable custom event.
1. Will Photon combine a few events sent to the same actor to optimize the traffic? Should I combine the world state as big as possible and let Photon slice it?
2. Should I care about incomplete message/packet? For example, if Client1 received State2 and State3 but State4 was lost, is Photon going to drop them all or leave it as is?
↧
Security Issue
Hi.i have send you and email(Email : Aidin0181@gmail.com) with some notification about your application security.but you didn't send me back any message.did you get that email??
↧
↧
How do we know the traffic on both side?
Hi, I'm using PhotonServer + LoadBalacingApi, currently trying to figure it out what kind of compression fits my archetype best. Is there a way we could know the precise packet size(including the header) we're transferring? I've seen a beautiful monitor window in Bolt, does PhotonServer/LoadBalacingApi provide similar data?
↧
RTT on LAN for Self Hosted Server
What Round Trip Time should I be expecting for a single isolated Operation Request when using the Self Hosted solution on LAN?
In my own experiments I'm getting around 20ms, which seems relatively high.
↧
RPC and packet flooding protection?
Hi!
Does Photon have protection against too many RPC commands and other packet flooding protection?
Somebody figured out how to run functions from my .NET assembly so they can send RPC's whenever they want to. Of course I can prevent this in other ways but prevention against flooding seems like a sane thing to do too.
Is there built-in support in Photon for this?
↧
Open-world, non-MMO server architecture
I have a near-infinite game world that I am looking to add multiplayer to and would love some input on the best way to go about it.
The problem as I see it is the need for server authority over physics checks such as fireball and arrow hits and dealing with floating precision errors. Nothing super sensitive or complicated, it's a fantasy RPG, not a fast-paced FPS. In single-player the game deals with this by shifting the world back to 0,0 in 8192m increments so the player is never calculating numbers greater than that. Some players however have reached 10,000+ kilometers in the gameworld; I'm not clear on the best way to handle this server-side.
Now I'm not looking to add support for 100s of players or an MMO type server farm, for now 2-4 players is plenty. But, again, this is openworld, not "area" or "room" based, players are free to go in any direction.
Solution 1:
I'm imagining a master server setup where the game data/inventory/crafting is stored and handled on the master server and sub-servers are generated as needed to handle local physics and AI. If both players are within 8192m (simplified) of each other one server is enough. If player 2 gets far enough away a second server starts up and when it's ready it takes control of player 2s local physics, keeping the world near his/her local 0,0. When player 2 again crosses the threshold for "rejoining" player 1, both physics checks go back to player 1s server, server #2 goes to sleep waiting for someone to wander out again.
Solution 2:
Since we are only running logic on the server, local areas could be defined in world space on a single server offset enough to prevent interaction with one another. In single-player AI more than 200m (guess) is disabled. With a known offset of say y-1000 for player 2 (when he/she gets too far from player1), we could handle player 2's physics checks at varying locations. This is basically the same idea as solution 1, just handled different.
Again, nothing horribly difficult, enemy navmesh checks, a few projectiles tops, and player movement against world colliders.
Thank you for any input.
↧
↧
JoinRoom Failed
Hello
I have been developing games with Photon Unity Networking (PUN).
However, I want to add Server side logic, so I'm running Photon Server by Self-Hosted and I am checking the connection.
A problem occurred here.
Only one of the PC, or Android (exists in the same LAN as PhotonServer (PC)) can participate in the Room.
When either terminal is joining Room, the other attempts to join Room, the following Error will occur.
Operation failed: OperationResponse 226: ReturnCode: -2 (Join failed: UserId is not set, checkUserIdOnJoin=true expects a UserId.). Parameters: {} Server: GameServer
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1621)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:157)
public class PhotonManager : Photon.MonoBehaviour {
private string ROOM_NAME = "ROOM_1";
private void Start()
{
PhotonNetwork.autoJoinLobby = true;
PhotonNetwork.ConnectUsingSettings("v1.0");
}
private void OnGUI()
{
GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
}
//============================Button Event============================
///
///After entering the lobby.
///
public void OnJoinOrCreateRoomButton()
{
RoomOptions roomOptions = new RoomOptions()
{
MaxPlayers = 20,
IsOpen = true,
IsVisible = true,
};
PhotonNetwork.JoinOrCreateRoom(ROOM_NAME, roomOptions, null);
}
public void OnPhotonDisConnect()
{
Debug.Log("Discon");
PhotonNetwork.Disconnect();
}
//=======================================================================
void OnJoinedLobby()
{
Debug.Log("OnJoinedLobby");
}
//ランダムでRoomに接続失敗
void OnPhotonRandomJoinFailed()
{
Debug.Log("OnPhotonRandomJoinFailed");
// Room作成
PhotonNetwork.CreateRoom(ROOM_NAME);
}
void OnPhotonJoinRoomFailed(object[] codeAndMsg)
{
Debug.Log("JoinRoom()の呼び出しが失敗! " + codeAndMsg[0].ToString()+" : "+codeAndMsg[1 ]);
}
void OnCreatedRoom()
{
Debug.Log("OnCreatedRoom");
}
void OnJoinedRoom()
{
Debug.Log("OnJoinedRoom");
}
}
PC, Android, both can participate in the lobby together.
How do I put all the terminals into the Room?
What is UserId of this error?
Thank you.
↧
ApplicationBase mscorlib error
Hello,
I was trying out a demo test server from the "Unity Multiplayer Games" book (link) which is similar to the App From Scratch in that it extends the ApplicationBase class for the server.
However the ApplicationBase inheritance causes the following issue:
I'm trying to learn to use Photon Server for a project at university where they are asking use to create a basic MMO-like game. We decided to used Unity and found Photon as a middleware solution as it seemed relatively """simple""" to use in relation to the learning curve.
Despite a couple hours of searching around the internet, I could not manage to find any semblance of solution related to this issue.
CS7069 - Reference to type 'MarshalByRefObject' claims it is defined in 'mscorlib', but it could not be found
Here is an image from my Visual Studio:
↧
Hello sir/maam. Plss help me. Why i need to reopen my game to connect in photon server.
Even i i check the auto joined lobby. I cannot reconnect to the photon room after my game end and go back to the main menu
↧
Disconnect and reconnect in photon server.
Hello pls help me how can i disconnect in the room after i connected. Because if i connect in the room if i call the main scene. I become disconnected in the room .
↧
↧
Moved: Hello sir/maam. Plss help me. Why i need to reopen my game to connect in photon server.
This discussion has been moved.
↧
Moved: See knock back effect immediately on client side
This discussion has been moved.
↧
Question about the Photon3DotNet dll
I want to know what the IphotonPeerListener.OnMessage is, and information about when it is called. It does not appear in the unity dll nor does the API Doc have it listed as method on there.
↧