Small sync framework (3 posts)

  • Profile picture of kazeshiro kazeshiro6p said 7 months, 3 weeks ago:

    Hi all monkeys!!

    Like the title i need to do a little sync framework that makes possible to syncronize some players on a network through a dedicated server.
    I have first to implement the mechanics needed to sync fileds that are updated more than 1 time per second, like the transform of the object. To do this i was thinking that a message-UDP-system should works fine, but if it is not, can anyone tell me which is the best way?

    Another mecanism that is needed is required to sync some players’ actions such as jump, attack and everything that can be assumed like an action that have to be executed not more than 1-3 times per second by each client. I was thinking to implement a little RMI system that, for example, has a flow such as:

    1- a client send a message to the server
    2- the server decode the message in an action
    3- the server broadcast the action through a RMI to all clients

    Another option is:

    1- a client makes an RMI to server
    2- the server broadcast the action through a RMI to all clients

    Another option is:

    1- a client makes an RMI to server
    2- the server broadcast the action through a message to all clients
    3- all clients decode the action and execute it

    Another option is:

    1- a client send a message to the server
    2- the server broadcast the action through a message to all clients
    3- all clients decode the action and execute it

    Which is for you the best solution?
    IMHO there are in every option eny cons and pros that can be synthesized in 2 aspetc:

    - a messsage is faster over the network but slower to be executed by clients and requires more code to be handled
    - an RMI is slower over the network but faster to be executed and more clean in a object-oriented design and esier in a coding perspective

    Every kind of advice is accepted and thanks!!! :-D

  • Profile picture of pspeed pspeed815p said 7 months, 3 weeks ago:

    I don’t have time to drill in too deeply as this topic rapidly explodes into something very big… :)

    But if you have not read these then maybe they will give you some ideas:

    http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking

    http://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization

  • Profile picture of makeshift makeshift28p said 7 months, 3 weeks ago:

    Is this what you are looking for : http://jmonkeyengine.org/groups/user-code-projects/forum/topic/mirrormonkey-a-synchronization-framework-for-jmonkeyengine/