We recently encountered a new problem. When one player send photonView.RPC (set to PhotonTarget.All), if one player lags or "lose focus" on mobile devices, other players cannot correctly synchronize. Is there a way to ignore the lagging player?
↧
About RPC
↧
Photon Server Setup and Tutorial
Hi,
I have previously used photon unity networking cloud to create a real time multiplayer game. I used photon cloud for that. Now, I am thinking of creating another game similar to agar.io.
Now for that I know I need a server which is online and can manage clients on multiple rooms with bots. I want all calculations of the movement for each client (which will be using Unity) should be done on the server side so that everything is synced. I was thinking of using photon server and was hoping to run the server on the machine and i will be able write the code to manage my requirements but I cannot seem to find the example of server side code and setup. Can anyone help me in this regard.
I have previously used photon unity networking cloud to create a real time multiplayer game. I used photon cloud for that. Now, I am thinking of creating another game similar to agar.io.
Now for that I know I need a server which is online and can manage clients on multiple rooms with bots. I want all calculations of the movement for each client (which will be using Unity) should be done on the server side so that everything is synced. I was thinking of using photon server and was hoping to run the server on the machine and i will be able write the code to manage my requirements but I cannot seem to find the example of server side code and setup. Can anyone help me in this regard.
↧
↧
Photon server for unity
hi.i'm new on photon for unity.i have a Game project that i have to set the logic for that game in server side and the server handle that logic, not Client.so i switched from PUN to Photon server and now i have these questions:
1-is it possible to make methods with photon server?or develop the photon server??if yes,please link some documentation except yours.i just found one 5 minute video in your site that show how to run photon loadbalancing.and 3 or maybe 4 about photon server setup for unity in youtube.
2-should i have to use PUN for unity??for connecting to photon server.i think i have to.because i had try that.just for sure i asked;
3-i am using Unity for my project.so i have read these articles that show unity security is in low level.
https://www.alanzucconi.com/2015/09/02/a-practical-tutorial-to-hack-and-protect-unity-games/
http://devxdevelopment.com/
so how can i for example handle my game logic in server that no one can't see or reach that even they changed my unity project source code??(this is my main question)
1-is it possible to make methods with photon server?or develop the photon server??if yes,please link some documentation except yours.i just found one 5 minute video in your site that show how to run photon loadbalancing.and 3 or maybe 4 about photon server setup for unity in youtube.
2-should i have to use PUN for unity??for connecting to photon server.i think i have to.because i had try that.just for sure i asked;
3-i am using Unity for my project.so i have read these articles that show unity security is in low level.
https://www.alanzucconi.com/2015/09/02/a-practical-tutorial-to-hack-and-protect-unity-games/
http://devxdevelopment.com/
so how can i for example handle my game logic in server that no one can't see or reach that even they changed my unity project source code??(this is my main question)
↧
User ID Not Set
We are setting up PhotonServer locally but can only connect and join a room once (one player). Any secondary attempts throw the following error:
Operation failed: OperationResponse 226: ReturnCode: -2 (Join failed: UserId is not set, checkUserIdOnJoin=true expects a UserId.)
From what I've read, this is a known issue since last year, and the suggestions have been to send a UserID from the client by setting it before connecting. This shouldn't be a problem because we authenticate users elsewhere and already have unique identifiers we can use. The question is WHERE do we set the UserID needed by Photon? What is the syntax? What class or property is accessed? I can find no documentation that works.
Operation failed: OperationResponse 226: ReturnCode: -2 (Join failed: UserId is not set, checkUserIdOnJoin=true expects a UserId.)
From what I've read, this is a known issue since last year, and the suggestions have been to send a UserID from the client by setting it before connecting. This shouldn't be a problem because we authenticate users elsewhere and already have unique identifiers we can use. The question is WHERE do we set the UserID needed by Photon? What is the syntax? What class or property is accessed? I can find no documentation that works.
↧
Moved: About RPC
This discussion has been moved.
↧
↧
QueueOutgoingAcksWarning
Hi,
I have read some posts around this topic including a comment like: QueueOutgoingAcksWarning: Happens when you client has 100 ACKs to send in it's queue. This happens when you lack SendOutgoingCommands calls, compared to the amount of data it receives and has to ACK.
What is meant by "ACK"? I am getting these messages and my client is receiving a lot of data. Does it mean i should be sending more requests out from the client? i tried adding explicit calls to "Sendoutgoingcommands" but still having these warnings.
Anyways what i see happening, once the client start processing events from the server, after it has received a whole wack of them but still not done all of a sudden i start seeing these AcksWarnings like 5-10 in a row, followed by a QueueIncomingReliableWarning and then a disconnectByServer event.
E.g. there are e.g. 7,000 events send to the client but after having processed say 3,500 the acks pop up and then the incoming reliable and then the disconnect?!
Any help or suggestions?!
Thanks
I have read some posts around this topic including a comment like: QueueOutgoingAcksWarning: Happens when you client has 100 ACKs to send in it's queue. This happens when you lack SendOutgoingCommands calls, compared to the amount of data it receives and has to ACK.
What is meant by "ACK"? I am getting these messages and my client is receiving a lot of data. Does it mean i should be sending more requests out from the client? i tried adding explicit calls to "Sendoutgoingcommands" but still having these warnings.
Anyways what i see happening, once the client start processing events from the server, after it has received a whole wack of them but still not done all of a sudden i start seeing these AcksWarnings like 5-10 in a row, followed by a QueueIncomingReliableWarning and then a disconnectByServer event.
E.g. there are e.g. 7,000 events send to the client but after having processed say 3,500 the acks pop up and then the incoming reliable and then the disconnect?!
Any help or suggestions?!
Thanks
↧
Amount of data sending per frame or tick
For example I need to send 1500 coordinates of units plus damages and other info(small amounts of parameters) per tick (10 times per second or faster if Photon can) it is real figures for Photon server or I need to find other ideas?
↧
Moved: QueueOutgoingAcksWarning
This discussion has been moved.
↧
problems while writing my own codes
Hi guys,i'm new user of photon server,and i am building my own server with the give photon server loadbalancing example.
Now i am running the server successfully, i am able to connect with my client side,and i can create rooms and join rooms, and such other things, but i wonder where should i write my own quest resolving codes bides the given ones, like i need respond the register request and login request from the client side,where should i add these codes, thanks
poor english,forgive plz
Now i am running the server successfully, i am able to connect with my client side,and i can create rooms and join rooms, and such other things, but i wonder where should i write my own quest resolving codes bides the given ones, like i need respond the register request and login request from the client side,where should i add these codes, thanks
poor english,forgive plz
↧
↧
Finding server on LAN
Is there a way to automatically find and connect to a Photon server on LAN?
If there isn't anything already built-in to Photon, how can this be accomplished?
If there isn't anything already built-in to Photon, how can this be accomplished?
↧
Counters & StatsD
I'm trying to push up some server counters via StatsD to our monitoring back-end. The trouble I'm running into is there doesn't seem to be anyway to define a specific "metric_type" as described in this documentation: Photon Counters
Specifically I'd like to send a value as a gauge metric type - and potentially other adjustments too. Is there any way to to do this? Or should I just look for a 3rd party solution?
Specifically I'd like to send a value as a gauge metric type - and potentially other adjustments too. Is there any way to to do this? Or should I just look for a 3rd party solution?
↧
Send some value on server and get that value for both players when starts game pay scene
i want to save time on randomly bases for countdown for the both local and remote player.How can i achieve this task.Thankx in advance
↧
InstallCounters
Using the InstallCounters/RemoveCounters from the command-line OR PhotonControl on a Windows10 machine results in "You do not have the appropriate credentials to perform the required action." Running this as administrator makes no difference. A colleague was able to get "InstallCounters" to work once; but then after that - he ran into the same credential issue over and over (when trying RemoveCounters/InstallCounters there-after). Any guidance?
↧
↧
How to set the player's properties on the server side?
I can use SetCustomProperties to set properties on the client. But I don't know how to do the same thing on the server side.
↧
A question about security.
Here is a question about security.
I`m using Photon.StartDust.Client as a pressure test. This is very convenient, however it also means that I can do pressure test from any machine.
If anyone else knows my IP address, he can use Photon.StartDust.Client attack my server, don`t know if I am right.
Is there any way to avoid this please?
I`m using Photon.StartDust.Client as a pressure test. This is very convenient, however it also means that I can do pressure test from any machine.

If anyone else knows my IP address, he can use Photon.StartDust.Client attack my server, don`t know if I am right.
Is there any way to avoid this please?
↧
Plugin doesn't work
hi.i have tried to use photon plugin documentation.here:
https://doc.photonengine.com/en-us/onpremise/current/plugins/manual
i have build my plugin dll and the LoadBalancing app can recognize it.and i used this code for my plugin to be simple.
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyPlugin
{
class my_plugin : PluginBase
{
public override void OnRaiseEvent(IRaiseEventCallInfo info)
{
string hi = "hello i have called u from unity";
string filePath = "E:\\log.txt";
// flush every 20 seconds as you do it
File.AppendAllText(filePath, hi);
}
}
}
so when i use my unity app to connect to the server in loadbalancing Log plugin will be created but my code wont work.
as johntube mentioned in this tread.
https://forum.photonengine.com/discussion/10264/how-to-handle-unity-events-from-server
There is no special flow for Unity clients.
Make a plugin (start with simple one: e.g. log OnRaiseEvent calls to file)
Build it
Configure it
Start server
Connect client to server (e.g. connect from Unity Editor)
See plugin in action
i will connect my unity editor to my photon server.it will connect to master, game server , and it will create a room but nothing will happen in my text file.
and i just confused with your plugin manual's page.
so so so confusing.as there is no simple plugin app tutorial from scrach.
so can u help me to work with plugins?
i don't know how to send data from unity to plugin o plugin to unity.
https://doc.photonengine.com/en-us/onpremise/current/plugins/manual
i have build my plugin dll and the LoadBalancing app can recognize it.and i used this code for my plugin to be simple.
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyPlugin
{
class my_plugin : PluginBase
{
public override void OnRaiseEvent(IRaiseEventCallInfo info)
{
string hi = "hello i have called u from unity";
string filePath = "E:\\log.txt";
// flush every 20 seconds as you do it
File.AppendAllText(filePath, hi);
}
}
}
so when i use my unity app to connect to the server in loadbalancing Log plugin will be created but my code wont work.
as johntube mentioned in this tread.
https://forum.photonengine.com/discussion/10264/how-to-handle-unity-events-from-server
There is no special flow for Unity clients.
Make a plugin (start with simple one: e.g. log OnRaiseEvent calls to file)
Build it
Configure it
Start server
Connect client to server (e.g. connect from Unity Editor)
See plugin in action
i will connect my unity editor to my photon server.it will connect to master, game server , and it will create a room but nothing will happen in my text file.
and i just confused with your plugin manual's page.
so so so confusing.as there is no simple plugin app tutorial from scrach.
so can u help me to work with plugins?
i don't know how to send data from unity to plugin o plugin to unity.
↧
A question about flow calculations
Hi
It's me again, this is a question about flow calculations
The following picture is a screenshot of our game client. This is the data after 232 seconds of the game.
I was wondering whether it can be calculated, how much bandwidth per second does this client take.
![]()
Here is my calculation, please help me to see if it is correct.
incomingTotalPacketBytes / incomingTotalCommandsInPackets = Average size of each packet
incomingTotalPacketBytes / 232 seconds = Average server bandwidth consumed per second
It's me again, this is a question about flow calculations
The following picture is a screenshot of our game client. This is the data after 232 seconds of the game.
I was wondering whether it can be calculated, how much bandwidth per second does this client take.

Here is my calculation, please help me to see if it is correct.
incomingTotalPacketBytes / incomingTotalCommandsInPackets = Average size of each packet
incomingTotalPacketBytes / 232 seconds = Average server bandwidth consumed per second
↧
↧
Why is FriendInfo.IsOnline always false?
I'm sorry I'm an inexperienced English speaker.
I was wondering
I set both PhotonNetwork.PlayerName and PhotonNetwork.AuthValues.UserId.
I checked the changes of UserId and PlayerName through Debug.Log.
When creating a room, PhotonNetwork.CreateRoom (this.roomName, new RoomOptions () {MaxPlayers = 10, PublishUserId = true}, null);
I created this option.
There is no message in the error window.
Please help me...
I want to make an online friend list.
I was wondering
I set both PhotonNetwork.PlayerName and PhotonNetwork.AuthValues.UserId.
I checked the changes of UserId and PlayerName through Debug.Log.
When creating a room, PhotonNetwork.CreateRoom (this.roomName, new RoomOptions () {MaxPlayers = 10, PublishUserId = true}, null);
I created this option.
There is no message in the error window.
Please help me...
I want to make an online friend list.
↧
Moved: Why is FriendInfo.IsOnline always false?
This discussion has been moved.
↧
Photon Plugin Not Receiving data in onEvent callback
Hi,
I am trying to implement a Plugin. Inside OnRaiseEvent i am IPluginHost.BroadcastEvent. I have a Javascript PhotonLoadbalancingClient which receives OnEvent callback with proper Event Code. The prblm is i am not receiving the data. Here is my code
Server
public override void OnRaiseEvent(IRaiseEventCallInfo info)
{
//base.OnRaiseEvent(info);
IPluginHost host = this.PluginHost;
int eventCode = info.Request.EvCode;
int ActorNr = info.ActorNr;
host.LogInfo("Event Code " + info.Request.EvCode+" ActorNr "+ ActorNr);
var data = new Dictionary
{
{0, 1},
};
host.BroadcastEvent(new int[] { ActorNr }, 0,123, data, (byte)CacheOperations.DoNotCache);
}
Javascript Client
onEvent(code: number, content: Object, actorNr: number) {
super.onEvent(code, content, actorNr);
this.logger.info("onEvent", code, "content:", content, "actor:", actorNr);
}
Inside onEvent
code is 123 which is correct
but both content and actorNr both are undefined.
I need to access data which i am passing in Broadcast Event on my Client.
Please help me out
I am trying to implement a Plugin. Inside OnRaiseEvent i am IPluginHost.BroadcastEvent. I have a Javascript PhotonLoadbalancingClient which receives OnEvent callback with proper Event Code. The prblm is i am not receiving the data. Here is my code
Server
public override void OnRaiseEvent(IRaiseEventCallInfo info)
{
//base.OnRaiseEvent(info);
IPluginHost host = this.PluginHost;
int eventCode = info.Request.EvCode;
int ActorNr = info.ActorNr;
host.LogInfo("Event Code " + info.Request.EvCode+" ActorNr "+ ActorNr);
var data = new Dictionary
{
{0, 1},
};
host.BroadcastEvent(new int[] { ActorNr }, 0,123, data, (byte)CacheOperations.DoNotCache);
}
Javascript Client
onEvent(code: number, content: Object, actorNr: number) {
super.onEvent(code, content, actorNr);
this.logger.info("onEvent", code, "content:", content, "actor:", actorNr);
}
Inside onEvent
code is 123 which is correct
but both content and actorNr both are undefined.
I need to access data which i am passing in Broadcast Event on my Client.
Please help me out
↧