Tutorials for synchronising states...

thetnswe
thetnswe ✭✭
edited August 2013 in DotNet
Hi,
Can you provide me of how to synchronise states that every multiplayer networked games does.. States might include movement, animation and also rigidbody physics simulation states..


Thanks

Comments

  • Most of these things are no states though (they have no persistency requirement) and would be done through simple Event raising on the client.

    For those things you really want to keep a state stored on the server you can either use Properties where applicable or implement own operations if the change is meant to do more than just change a value on the server side. Operation implementations require change of server application code as well as client side code
  • So.. MMO doesn't deal with states.. How could I synchronise some kind of rigidbody states.. I've seen the grid demo and the setting position are abit slow as it can have the maximum of only 10 frame per second... How can I make it smooth? The island tutorial is not working on Unity 3.0 and it would be great if I can test the island demo which includes more technique of synchronising betwen clients..
  • The items in the mmo demo have states just like the actors in lite. They are set via SetProperties.
    The demo shows that by syncing color and view area sizes.
    To get movement more smooth I believe you would use the Vector3.Lerp function, but ask the unity pros for that. In addition use prediction: For instance, take the distance to the last known position and assume that the item has moved into the same direction with the same velocity and move to the predicated position.
  • So.. How about the AI? Can I implement AI stuffs in clients? I think AI needs to be in server side right? any sample for AI servers.... it would be really helpful even if it is a small demo..
  • You can find one approach for AI in the hidden Npc classes in the mmo server project. Include these files and exclude the MmoWorld.cs.
  • Thanks for the info... Any sample Unity application using this server library or any tutorials of how to use it? Can you explain the AI server processes as I am really new to the MMO approach. What my understand is that AI characters are created and handle from the server and server synchronise the AI characters with clients so AI has got it's own interest areas... ALthough I am start doing a small MMO so I am not considering of how to divide interest areas in this learning stages. Do you have any links to white papers and stuffs of explaining more about MMO AI Characters and approaches...
  • The AI here has it's own interest areas to get the knowledge about who is near.
    Of course you could do this in a totally different way, for instance have the client tell the AI directly when he is near.
    Or even have the client move the AI instead (just make sure there's only one client controlling the AI at a time).
    To move the AI on the server side schedule a position update on the AI item fiber.
    For path finding you could use OpenSteer, or implement your own A* algorithm.
    Sorry, no other photon specific tutorials or white papers I could point you to.
    Really depends a lot on your taste and on how much you trust the client.
  • thanks... this is alot of information already.. All I have to do is to understand what the Photon can do and try to implement a small MMO with the learning experiences..
  • Sorry to necro-post.


    Does anyone have an examples how to use this OpenSteer with Photon-Server?