Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Sid on August 07, 2015, 12:50:12 PM
-
How are you all increasing or decreasing your Photon sendRate?
int PhotonNetwork.sendRate
int PhotonNetwork.sendRateOnSerialize
Thanks!
Sid
-
Also would like to know!
-
Hi,
I'll create the custom actions for this.
Are you sure you know what you are doing with this? people will generall decrease the sendrate for efficiency, if you have problems of synchronization, increasing the sendrate is likely not the right way to solve it.
Bye,
Jean
-
Hi Jean,
I'm really looking to decrease the sendrate for efficiency, I only need to synch position, rotation and animation but it doesn't need to be accurate and lag is acceptable.
Thank you for responding so quickly and writing an action. I will test it the very second you upload it!
A
-
Hey Jean, any joy with this script?
Many thanks
C_Fox
-
Also an action to get ping would be nice:
PhotonNetwork.GetPing()
And an action to get network time too, to use timestamps (just like old Unet actions have, "Network Get Time")
-
Hi again,
Just to help my own understanding... the sendrate affects the rate at which variables with 'network sync' ticked are sent through to other connected peers via photon and the sendrate does not affect the timing of RPC events (i.e. and RPC does not wait for the next send but instead 'fires' off as fast as possible)?
In theory, does that mean that during idle states the individual's client could reduce its own sendrate to become more efficient.
And... as a room becomes more full all clients could reduce their scale rate to allow more players but less accuracy/timliness of data?
Anyone's thoughts are welcome!
-
There is no point in these...the type of game determine the need of more accuracy or not. If your game needs accuracy, you can't lower sent data just because there are more players. If this is the case, and bandwith is a limit, you should then consider the maximum of players can play at a given time.
I've never heard of a game that changes tick rate on the fly.
About RPCs, as long as I know they are not fired instantly...but just in the next ticket update...so they rely, anyway, on tickrate.
There is a method to send something "instantly"
See:
http://forum.unity3d.com/threads/photon-pun-are-rpcs-sent-instantly.293266/
-
Photon Get Ping (Thanks to MABManZ):
http://hutonggames.com/playmakerforum/index.php?topic=11297.0
Variables with 'network sync' are sent all the time, RPC are sent when you send them. Thats how I understand :D
-
There is no point in these...the type of game determine the need of more accuracy or not. If your game needs accuracy, you can't lower sent data just because there are more players. If this is the case, and bandwith is a limit, you should then consider the maximum of players can play at a given time.
I've never heard of a game that changes tick rate on the fly.
About RPCs, as long as I know they are not fired instantly...but just in the next ticket update...so they rely, anyway, on tickrate.
There is a method to send something "instantly"
See:
http://forum.unity3d.com/threads/photon-pun-are-rpcs-sent-instantly.293266/
Thanks for the reply, if changing the sendrate dynamically during gameplay is not an option then surely these scripts would help in simply setting the sendrate in the first place?
Just using Destiny as an example, their hub area can be populated by many players, but interaction and activity is extremely limited (forming fireteams for example) but in-game it's limited to just a few... presumably the game scales things like it's own version of a 'sendrate/tickrate' depending on the situation, that is something that would be exceptionally useful to me even if it were to only work between scenes where different maximum players and activities apply.
-
Photon Get Ping (Thanks to MABManZ):
http://hutonggames.com/playmakerforum/index.php?topic=11297.0
Variables with 'network sync' are sent all the time, RPC are sent when you send them. Thats how I understand :D
Thanks for pointing that out!
-
I Jean, I don't suppose you've had a chance to look at this?
Happy New Year!
-
Hi,
I did implement them on the last update. Check both the sendrate (https://github.com/jeanfabre/PlayMaker--ExitGames--PhotonUnityNetworking_U4.3.4-Library-/blob/master/Actions/PhotonNetworkSetSendRate.cs) and SendRateOnserialize (https://github.com/jeanfabre/PlayMaker--ExitGames--PhotonUnityNetworking_U4.3.4-Library-/blob/master/Actions/PhotonNetworkSetSendRateOnSerialize.cs), depending on your needs.
so if you update pun from the Ecosystem you should get them.
Bye,
Jean
-
Great news, thank you!
-
Hello.
THanks for this actions!
Default:
PhotonNetworkSetSendRate = 20
PhotonNetworkSetSendRateOnSerialize = 10
How they are working together? I cant find documentation about they.
Is PhotonNetworkSetSendRate need to be 2X larger?
Can someone write about they?
what is the different between?
(it is hard to understand in english for me)
-
Hi,
basically, under the hood, we have this rule: sendRateOnSerialize needs to be <= sendRate
I think it works this way:
sendrate is used by all built in features ( like synching general data, ) and sendRateOnSerialize will affect all the component based photonviews that synch your game's own set of data, so this affect Fsm Variables being synched.
The lower the sendrate, the less bandwith it will take, and the more efficient it will be, however you will increase the lag between players. Higher sendrate will improve and reduce lag at the cost of more information having to travel across internet. So this is a balance to seek basically. I would not touch this if you don't know exactly what you are doing and you have hard data to give evidence that modifying the send rate may increase your game quality or address a specific issue.
I would ask on Photon forum directly to get an educated answer, because the PlayMaker actions are directly accessing these.
Bye,
Jean