Help save net neutrality! Learn more.

New messages

  • Anonymous - 2009-01-27

    Any guidelines to add new messages to the system?

    • Miguel Angel Blanch Lardin

      For example... for adding server 2 server sync message? :)
      Just take a look to the messages already added and copy paste. Then you need to register the message somewhere in MessageFactory and that should be enough.

      • Anonymous - 2009-01-28

        I wasn't exactly thinking about that, but I will take that as a later project maybe.

        I need to add some application specific messages.

        Can this MessageFactory be overwritten in my application as the other implementations?

        Are there any limitations in the contents of those messages?

        • Miguel Angel Blanch Lardin

          It would be done at Marauroa and I think you would need to modify Marauroa source itself.
          Another option is write the code and if it is useful for everyone else I add into Marauroa, but keep in mind that Marauroa is VERY oriented to perception/actions system.

          • Anonymous - 2009-01-28

            Isn't there a way to extend the message engine like the others (RPObjectFactory, etc...? The new messages are application specific.

            If not, should that be a request?

            • Miguel Angel Blanch Lardin

              No that I remember.
              May you explain me the purpouse please? I don't really understand advantages of adding new message types.

              • Anonymous - 2009-01-30

                For example I want to send a request to the server for some data to be sent back to the client.

                Basically, in my game, the player has a collection of pages. A local copy and one in the server. This is a mean of updating the local copy.

                Is something like web services concept but since there's a message system already in place why not use it?

                • Miguel Angel Blanch Lardin

                  You can do as Durkham says or you can send an action and make server send you a stream of data with S2C Transfer message.
                  Adding new messages that dupe functionality that can already be done isn't a good idea.

    • Astrid Sawatzky

      Astrid Sawatzky - 2009-01-30

      If i had that task.

      I would send an Action to the server.

      process that action serverside
      and send back an event and process the event clientside

      What might be needed is the extension to be able to send blobs via the system. Depends on the 'page' 's data.

      • Anonymous - 2009-01-30

        Sounds reasonable. I already have the string-page-string functions in place. Or I can make each page an object whose owner is the player (like sheep). But each player might have probably hundreds of them. Would that be an issue performance wise?

        It would be easier to send the sheep that are missing from the client side?



Cancel  Add attachments