About Network OnEvent
Options
Hello~
I am a new one in study PUN in service a battle game with unity 3.5.4 and Photon Server_v3-0-37-3631.
I got a question for client send "photonview" message in RunViewUpdate() with 20 KB/s rate.
I had change "photonview" to make send data down like this:
And set "bUpdate" when i really change the position or other in Games.
But I think that is not the true way for this.
So I get more check for OnEvent to know why over 100 item in the room will happen the lag.
I have to change server setting like this:
I think this have to solve some question like "UnReliableData Too big" but not work on lag with over 100 items.i had add some thing in "OnEvent" like this:
To know a sec for 1400~1800 Events will be solve.
But in really, there have more than 2000 Events in a sec and make it got lag.
when I use A, B, C 3 client to work in a room.
A with 1 item.
B with 1 item.
C with 201 items.( 1 hero and 200 GameObjects)
when I control C hero and A, B not see the hero move.
But i control A or B hero and A, B, C see the hero move.
I can not see the "peerbase" control code and just know there has something wrong..
is there any setting wrong or lost in Game?
I test this in "DemoVikings" with E5300 with 2.60 GHz CPU and 2G RAM.
and other setting like this:
I am a new one in study PUN in service a battle game with unity 3.5.4 and Photon Server_v3-0-37-3631.
I got a question for client send "photonview" message in RunViewUpdate() with 20 KB/s rate.
I had change "photonview" to make send data down like this:
if (!view.bUpdate && !view.bAllUpdate) { continue; } view.bUpdate = false;
And set "bUpdate" when i really change the position or other in Games.
But I think that is not the true way for this.
So I get more check for OnEvent to know why over 100 item in the room will happen the lag.
I have to change server setting like this:
MaxMessageSize="512000" MaxQueuedDataPerPeer="512000" PerPeerMaxReliableDataInTransit="51200" PerPeerTransmitRateLimitKBSec="5120" PerPeerTransmitRatePeriodMilliseconds="100"
I think this have to solve some question like "UnReliableData Too big" but not work on lag with over 100 items.i had add some thing in "OnEvent" like this:
iCount++; if (iTick < System.Environment.TickCount) { Debug.Log(iCount); iCount = 0; iTick = System.Environment.TickCount + 1000; }
To know a sec for 1400~1800 Events will be solve.
But in really, there have more than 2000 Events in a sec and make it got lag.
when I use A, B, C 3 client to work in a room.
A with 1 item.
B with 1 item.
C with 201 items.( 1 hero and 200 GameObjects)
when I control C hero and A, B not see the hero move.
But i control A or B hero and A, B, C see the hero move.
I can not see the "peerbase" control code and just know there has something wrong..
is there any setting wrong or lost in Game?
I test this in "DemoVikings" with E5300 with 2.60 GHz CPU and 2G RAM.
and other setting like this:
networkingPeer.WarningSize = 2000; networkingPeer.CommandBufferSize = 2000; networkingPeer.LimitOfUnreliableCommands = 500000; sendRate = 1000;
0
Comments
-
Then I Try to test with net limit and see A data send in server with 337 KB/S and back to B with 93KB/S
That means server lose some data or process some data?
or the server can not send so fast then 100 KB/S with some setting?
http://photo.xuite.net/newagegpx/5861001/1.jpg0