[ejabberd] Multi user games with ejabberd
pablo.platt at yahoo.com
Tue Nov 11 00:46:59 MSK 2008
I saw chesspark muc implementation but I believe PubSub is the way to go. It handles permissions, storage and search out of the box.
Parsing all the possible xml tags inside a message stanza and rout them to components on the client side is complicated and even more complicated when you are trying to load plugins on demand.
This proposed game spec requires the client to have a 'game' component that will handle the 'invite' tag and then a chess component that will handle the moves. In addition, you have to check if the message stanza contains a normal chat message or some extension.
The reason I'm asking this here and not on the XMPP mailing list is because I think that ejabbered PubSub is 99% compatible. The only missing link is to be able to configure a node not to send notifications to the publisher.
From: Christopher Zorn <christopher.zorn at gmail.com>
To: ejabberd at jabber.ru
Sent: Monday, November 10, 2008 4:18:35 PM
Subject: Re: [ejabberd] Multi user games with ejabberd
On Sun, Nov 9, 2008 at 6:26 PM, Pablo Platt <pablo.platt at yahoo.com> wrote:
What is the best approach to create a multy user web game with ejabberd?
There are two main use cases:
1. 1 on 1 game like a chess game. A slightly more complicated scenario will enable observers.
2. Multiple players like a poker game.
There are many ways to answer this question. The 'best' way almost fits the game you want. There has not been much discussion on this topic too. I think there should be more. :)
I'm more interested in the first case, a chess game. There is a spec but it is not improved and seem forgotten:
I also have a feeling that PubSub should be the way to go and not creating a new protocol.
I thought of creating a node per game. The two players will have permissions to publish to that node.
One problem is that when a player publish an item to the game node - a chess move, the PubSub mechanism will send all the subscribers the move.
The player that makes the move will get the move data and that's a waste of bandwidth. Is there a way to publish the item to all the subscribers except for the publisher? I'll appreciate other ideas and experience.
Chesspark (http://chesspark.com) uses ejabberd and uses MUC and Pubsub to handle different ways to broadcast game messages. There are plans to document the protocol and make it easier for developers to join in and write their own chess clients.
ejabberd mailing list
ejabberd at jabber.ru
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ejabberd