playMaker

Author Topic: PHOTON synchronizing problem. Cars are lagging alot.  (Read 22717 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PHOTON synchronizing problem. Cars are lagging alot.
« Reply #15 on: December 02, 2013, 11:59:43 AM »
Hi,

 Keep us updated!

Bye,

 Jean

drakuls

  • Playmaker Newbie
  • *
  • Posts: 3
Re: PHOTON synchronizing problem. Cars are lagging alot.
« Reply #16 on: December 02, 2013, 01:46:16 PM »
hey guys, a small update...

we are now a team of 5 people, and we actually switched to uLink library... its much better than photon, when it comes to physics... because photon is just not made for such things...

Hi!
We are 2 guys developing car racing game (designer and programmer).
Can you please describe in more detail what is the worst sides of photon ? Why uLink ?

bizilux

  • Full Member
  • ***
  • Posts: 171
Re: PHOTON synchronizing problem. Cars are lagging alot.
« Reply #17 on: December 02, 2013, 02:24:43 PM »
hey guys, a small update...

we are now a team of 5 people, and we actually switched to uLink library... its much better than photon, when it comes to physics... because photon is just not made for such things...

Hi!
We are 2 guys developing car racing game (designer and programmer).
Can you please describe in more detail what is the worst sides of photon ? Why uLink ?

photon is mainly meant for games that are not using physics, as far as i've seen... you would need to write ur own physics library/engine...

uLink allows us to make seamless MMO,   (seamless MMO is world of warcraft for example), and it uses unity physics engine and it has lots of premade code already written for it... for example we are using smooth rigidbody improved script, that basically predicts with help of interpolate and extrapolate, where the car will be at certain time, until player and other clients get new update from server...  this helps with ping and lag a bit...

and ofcourse we are using authoritative server. so all physics are handled on server, and player only sends commands to server, for example: im holding down forward arrow, and then server does its calculations, and sends state back to player, and all other clients, the position of car based on pressed forward arrow...

price is more expensive, but if you think price/time... it would take us a lot of time, to get proton to the level that uLink is...

photon is good for small games that dont use physics, but for something like racing game, i think its a no-go...

have you actually made anything in photon? are synhronizations working? i mean is multiplayer working and cars drive nicely?

drakuls

  • Playmaker Newbie
  • *
  • Posts: 3
Re: PHOTON synchronizing problem. Cars are lagging alot.
« Reply #18 on: December 02, 2013, 03:12:01 PM »
hey guys, a small update...

we are now a team of 5 people, and we actually switched to uLink library... its much better than photon, when it comes to physics... because photon is just not made for such things...

Hi!
We are 2 guys developing car racing game (designer and programmer).
Can you please describe in more detail what is the worst sides of photon ? Why uLink ?

photon is mainly meant for games that are not using physics, as far as i've seen... you would need to write ur own physics library/engine...

uLink allows us to make seamless MMO,   (seamless MMO is world of warcraft for example), and it uses unity physics engine and it has lots of premade code already written for it... for example we are using smooth rigidbody improved script, that basically predicts with help of interpolate and extrapolate, where the car will be at certain time, until player and other clients get new update from server...  this helps with ping and lag a bit...

and ofcourse we are using authoritative server. so all physics are handled on server, and player only sends commands to server, for example: im holding down forward arrow, and then server does its calculations, and sends state back to player, and all other clients, the position of car based on pressed forward arrow...

price is more expensive, but if you think price/time... it would take us a lot of time, to get proton to the level that uLink is...

photon is good for small games that dont use physics, but for something like racing game, i think its a no-go...

have you actually made anything in photon? are synhronizations working? i mean is multiplayer working and cars drive nicely?


Yes in our case the multiplayer is working. Basically everything works smooth and in sync, just using .lerp functions between the received frames.
For more secure multiplay I even managed to adapt interpolation and extrapolation scripts- so i can change parameters and adjust the moment when the lag starts to happen and when car is realistically moving. I havent tried with more than two cars yet- maybe then the problems starts to happen :). Basicaly now I have one final problem, that the player cant see other players cars wheels spinning and steering. You know. Just like photon says - Iam using in Resources folder my cars prefab. Prefab has its own PhotonView, with OnPhotonSerializeView stream script. This Car Prefab also contains wheels and other stuff. And I even tried to attach another photonview to the each wheel and created OnPhotonSeriealizeView streams for them.. But nothing changes... Tried many different combinations, I just dont understand what is the problem.

Basicaly I am now thinking to try uLinks Trial version and adapt it to my game. And than see what changes what not.

bizilux

  • Full Member
  • ***
  • Posts: 171
Re: PHOTON synchronizing problem. Cars are lagging alot.
« Reply #19 on: December 02, 2013, 03:32:27 PM »
oh well i couldnt get it to work... and then i decided to get team and do it with uLink... so yeh i was alone when trying to get photon to work with it...

one thing you could try is, not send any wheel information over network, but have each client rotate wheels along their pivots based on how fast the car is going... it wont be peerfect and it will need quite a bit of tweaking to get it right probably... but yeh its something... and for front 2 steering wheels, its a bit more complicated... you could rotate them towards where the car is heading... but i can imagine this wont work that well at all...

but im sure there is some way to do it over photon... if you managed to do everything else... rotating the wheels shouldnt be that big of a problem? :)

but yeh photon can be a bitch some times...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PHOTON synchronizing problem. Cars are lagging alot.
« Reply #20 on: December 04, 2013, 05:34:43 AM »
Hi,

you will face this problem with all netwrking solution, I don't think photon is to blame here ( unless another networking solution has some drag and drop systems for physics stuff).

 Also, I heard that Unity networking has a special physics networking view, maybe you shoudl investigate this as well.

bye,

 Jean