marauroa: how is message delivery guaranteed?

  • grumble

    grumble - 2006-05-17

    hello, i read in your wiki that the marauroa protocol is based on UDP, which cannot guarantee that messages arrive in order or arrive at all.

    in a game there are usually some messages that _must_ be delivered, since they are decisive for the gameplay.

    for example, when i cast a certain spell on a monster to kill it, this message must arrive on the server, so the gameplay state is updated that the monster is now dead.
    another example would be simple chat messages.

    so, my question is how does marauroa handle these kind of messages over its protocol?
    thank you!

    • Miguel Angel Blanch Lardin

      Short answer:
      It doesn't.

      If you play enough you will see an out of sync message on game log, that means that an important UDP packet was lost and client need to resync with server.

      In the case of client->server communication the problem is simpler to solve, because the lack of feedback will make you repeat the action.

      On a near ( 6-12 months ) future I have plans to add guaranteed delivery to Marauroa for some important things like text.

    • grumble

      grumble - 2006-05-18

      thank you, miguel.

      so would you recommend considering the current marauroa as a choice for a very text- and chat-heavy game?

      you say "because the lack of feedback will make you repeat the action", but couldn't that theoretically result in an infinite loop? like when the message does not arrive, the client will try to resend it and it won't arrive again and again... =)


      • Miguel Angel Blanch Lardin

        Of course I can say you that as it is now marauroa isn't the best option for that kind of application. I would suggest to fork an IRC server.

        The real point is: how much work would take to build a guaranted delivery over marauroa? Really not much, around 4-5 days to build it using some standard. TCP is not an option because data is considered an stream and that's not good.

        That infinite loop is called disconnected :)

    • grumble

      grumble - 2006-05-19

      thank you, miguel.

      those are some good thoughts.
      maybe implementing "reliable udp" or udp packets with different priorities like it is done in some network libraries, like raknet or torque.



Cancel  Add attachments