playMaker

Author Topic: Photon/Playmaker - Trying to create ball that all players can interact with  (Read 1757 times)

RealSuperSandLG

  • Playmaker Newbie
  • *
  • Posts: 6
I'm super new to photon, and being so i decided to test around with it by creating a quick soccer game. I've so far to get people in the game and have goals at each end, but for some reason i cant seen to get the ball to sync in to other players. all that ever happens is it just gets stuck into the ground. I've seen posts where they say photon doesn't really work well with physics, but I've seen games that use them pretty well with photon, but i don't really know how.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

you are right, Photon ( and all network solution that do not use a headless version of Unity to run the physics as authoritative) are not suitable for advanced physics.


you could be running a headless version of Unity on a server ( think of a Unity application that simply doesn't need to show anything), that Unity app would be the authoritative Master that distribute data to all players (clients). Clients have their physics disabled and only synchronize inputs to the master, the master then control everything based on these inputs and send back the position of various elements, giving you the feeling you are in control locally, but it's not true, it's controlled remotly.

 uNet works like that for its main usage.

 This is unfortunately way too expensive to run for mere mortals and indies, the cost of running a cloud server system with amazon is really crazy expensive.

However Photon released not so long ago a solution, ( but incompatible with PlayMaker) called trueSync, if you are ok with programming, this is a very good solution to test out. I personnally worked with it, and it does work, though limited, as the whole physics engine is custom and so still limited.

https://www.photonengine.com/en-US/TrueSync

Bye,

 Jean

RealSuperSandLG

  • Playmaker Newbie
  • *
  • Posts: 6
Ok, thanks for the input jeanfabre, your a legend.