Sending Animation States over the network

ktweedy1ktweedy1 ✭✭
edited August 2010 in Photon Server
I have Mmo project no working with sending the complete transform, position, rotation and scale.

So next I need to send the animation states of the avatars. Basically I need to send the animation name as a string out to everyone when a new animation starts.

Any suggestion on how to do this? Or do I need to make a new operation and event to recieve and send it?

Comments

  • You could use the properties for this- then someone who has just gained sight might be able to jump into that animation (I'm no unity pro, so no idea if that is even possible).
    Another option is the existing raiseevent operation where you can define custom event content.
    Third option: your own event and operation as you were writing above.
  • properties are indeed one of the most solid ways should the animations be long enough to require "jump in later".
    if thats not of interest then raiseevent is enough.

    whats important in either case is that you sync the animation start time and the animation, not just the animation, cause you need the start time to handle it correctly in the client side prediction
  • Thanks, sounds good, unity makes it more complicated, and i guess any game does this, in that there can be several animations playing, layered, so need to share bot the animation configuration, and which animations have started when.

    appreciate the ideas.
  • Unity isn't complicated in any way in this case actually.

    With most other engines you would have significantly more problems tying in 3rd party networking.

    A good starting point out of my view is the Networking Example at unity3d.com - support - resources because it has 2 classes for animation sync, depending on the situation.

    buffered RPCs basically map to properties, where as the rest would be events
  • I see the AuthServerPersonAnimation and the NetworkSyncAnimation. I kind of like the AuthServer once which basically shares an event and that gets turned into animations commands and not directly share the anitmations state. At least for my application that seems feasible and easier then tracking and looping over all the animations in the compopent and sharin their state.
  • Both have their benefits, it depends on how the game will be built in the end.
    But they are very good learning experiences.

    Same goes for the network rigidbody, its a very solid thing when it comes to client side prediction etc. which would be of interest if your game is action oriented (for an mmo style game you might not need that much of black art ;))
Sign In or Register to comment.