playMaker

Author Topic: Client Side Prediction (Photon + Playmaker)  (Read 3199 times)

Raptcha911

  • Playmaker Newbie
  • *
  • Posts: 17
Client Side Prediction (Photon + Playmaker)
« on: February 15, 2016, 01:36:14 PM »
Hey,

I'm making a MOBA game prototype using unity and playmaker.. I'm using the latest 1.8 with unity 5.3.2.. And I'm using Photon for my networking.. I've done a real-time multiplayer in unity before, so I have some experience developing it.. But this is the first time I'm using playmaker to do it.. And I'm kinda confused how to go about all of it..

In my previous project I had made a prediction system to cope with the network latency..Somewhat similar to the dead reckoning technique.. And it worked out really well.. I want to do the same now, but using playmaker.. Its a little laborious to use the built-in actions in playmaker to achieve what I'm trying to make here..
This is my basic movement FSM to handle the movements of the local player -



I have another FSM where I continuously update the network synced position vectors..As you can see in this FSM I just have one state 'Get synced to player Position', where I hopelessly try to synchronize the position and rotation as its received from the client..I tried to use vector3 Lerp action to interpolate between the objects current position and the position received from the client... Of course its not enough and the movements are unbelievably jittery..

Should I make a custom action for it? I need to take the sent time and received time into account, and use some of the dead reckoning techniques to smoothly extrapolate the object.. Like how to get the time stamp in PhotonMessageInfo as in
Code: [Select]
OnPhotonSerializeView(Bitstream stream, PhotonMessageInfo info)

Or in general, I'd really appreciate if someone could point me the right direction.. As in making a Real Time Multiplayer in Playmaker tutorial or something like that.. I have gone through many tutorials and docs on making an RT multiplayer, so I'm not looking for any general coding stuff.. I'm looking for some tutorial or doc showing how to do this in playmaker in particular... Anything works.. I just want to know where to start.. Sorry if my question is very confusing.. its because I'm not even sure what to ask for in terms of playmaker.. As my profile says, I'm a Playmaker newbie..

Any input would be very much appreciated.. Thanks! :)

Raptcha911

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Client Side Prediction (Photon + Playmaker)
« Reply #1 on: February 15, 2016, 01:45:22 PM »
I have gone through the Demo Worker scene as well.. But its a very simple implementation of the prediction system and that method is not going to cut it.. As I'm making a MOBA game, precise prediction is of paramount importance!!.. So I'm looking to build a complex prediction system in Playmaker taking ping, packet loss etc into account..