playMaker

Author Topic: Photon sendRate?[SOLVED]  (Read 19688 times)

Sid

  • Playmaker Newbie
  • *
  • Posts: 32
Photon sendRate?[SOLVED]
« 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
« Last Edit: January 27, 2016, 09:56:54 AM by jeanfabre »

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #1 on: December 03, 2015, 11:18:36 AM »
Also would like to know!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon sendRate?
« Reply #2 on: December 04, 2015, 12:41:17 AM »
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

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #3 on: December 04, 2015, 06:11:56 AM »
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

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #4 on: December 10, 2015, 05:13:27 AM »
Hey Jean, any joy with this script?

Many thanks

C_Fox

zorranco

  • Junior Playmaker
  • **
  • Posts: 50
Re: Photon sendRate?
« Reply #5 on: December 15, 2015, 09:57:53 AM »
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")


charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #6 on: December 15, 2015, 10:42:33 AM »
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!

zorranco

  • Junior Playmaker
  • **
  • Posts: 50
Re: Photon sendRate?
« Reply #7 on: December 15, 2015, 11:28:00 AM »
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/
« Last Edit: December 15, 2015, 11:32:37 AM by zorranco »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 715
    • Flashing Lights
Re: Photon sendRate?
« Reply #8 on: December 15, 2015, 12:17:10 PM »
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

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #9 on: December 15, 2015, 05:29:45 PM »
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.

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #10 on: December 15, 2015, 05:30:19 PM »
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!

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #11 on: January 03, 2016, 04:15:46 AM »
I Jean, I don't suppose you've had a chance to look at this?

Happy New Year!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon sendRate?
« Reply #12 on: January 26, 2016, 07:46:15 AM »
Hi,

 I did implement them on the last update. Check both the sendrate and SendRateOnserialize, depending on your needs.

so if you update pun from the Ecosystem you should get them.


Bye,

 Jean

charming_fox

  • Junior Playmaker
  • **
  • Posts: 62
Re: Photon sendRate?
« Reply #13 on: January 27, 2016, 04:36:34 AM »
Great news, thank you!

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon sendRate?[SOLVED]
« Reply #14 on: March 26, 2016, 07:25:34 PM »
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)
« Last Edit: March 26, 2016, 07:27:37 PM by Bqlqzs »