%ents; ]>
Multi-User Gaming This document defines an XMPP protocol extension for multi-user gaming. &LEGALNOTICE; xxxx ProtoXEP Standards Track Standards Council XMPP Core XMPP IM XEP-0004 XEP-0030 XEP-0055 mug Torsten Grote Torsten.Grote(ät)fsfe.org Torsten.Grote(ät)jabber.fsfe.org Arne König arne.ko(ät)23inch.de arne++(ät)jabber.ccc.de Günther Nieß guenther.niess(ät)web.de niess(ät)jabber.ccc.de 0.0.3 2009-04-20 gn

Added sections about entering non-anonymous, semi-anonymous and fully-anonymous rooms.

0.0.2 2009-03-14 ak, gn

Second draft.

0.0.1 2008-07-17 tg

First draft.

Many modern instant messenger networks support playing games. Still, XMPP mostly lacks this kind of support. Therefore, this document (Multi-User Gaming or MUG) describes a base protocol for game playing over XMPP.

This protocol is not by itself sufficient to play games. It just describes a basic protocol framework which game-specific protocols can use.

This document addresses the functionality which is needed to play multi-user games over XMPP. In particular this functionality consists of:

  1. discovering support for games and of particular games
  2. inviting users to game rooms
  3. discovering and joining existing game rooms
  4. exchanging game information (moves, states, etc.)
  5. saving and loading of matches
  6. terminating games
  7. allow spectators to watch the match
  8. validate game moves

In addition, this document provides protocol elements for supporting the following room types:

  1. moderated or unmoderated
  2. public or hidden
  3. members-only or open
  4. password-protected or unsecured

The following requirements are explicitly not adressed, but might be realized by seperate XEPs.

  1. support for near-realtime games or for games which require low latency
  2. defined timers for each turn
  3. scores and highscores
  4. tournaments

The extensions needed to implement these requirements are qualified by the 'http://jabber.org/protocol/mug' namespace (and the #owner, and #user fragments on the main namespace URI).

Game -- a XEP which defines the rules of a match

Initiator -- the entity that started a game.

Match -- represents a specific instance of a game played in a room.

Member -- a user with an affiliation of type "member" in the context of member-only games.

Owner -- a priviledged entity that owns a game.

Player -- a user in a match who has a defined game role

Role -- role in the game (e.g. 'black' and 'white' in chess)

Room -- a game room in which matches are played

Room JID -- the &ROOMJID; by which an occupant is identified within the context of a match; contrast with Bare JID and Full JID.

Spectator -- an entity who does not actually plays the game but watches it.

Occupant -- a player or spectator who is currently in the match.

Unmoderated Room -- The owner has limited rights. The match cannot be saved; antonym: Moderated Room.

Moderated Room -- The owner is allowed to kick users, revoke roles and save the match; antonym: Unmoderated Room.

Hidden Room -- a room that cannot be found by any user through normal means such as searching and service discovery; antonym: Public Room.

Public Room -- a room that can be found by any user through normal means such as searching and service discovery; antonym: Hidden Room.

Members-Only Room -- a room that a user cannot enter without being on the member list; antonym: Open Room.

Open Room -- a room that anyone may enter without being on the member list; antonym: Members-Only Room.

Password-Protected Room -- a room that a user cannot enter without first providing the correct password; antonym: Unsecured Room.

Unsecured Room -- a room that anyone is allowed to enter without first providing the correct password; antonym: Password-Protected Room.

Fully-Anonymous Room -- a room in which the full JIDs or bare JIDs of occupants cannot be discovered by anyone, including the room owner; contrast with Non-Anonymous Room and Semi-Anonymous Room.

Semi-Anonymous Room -- a room in which an occupant's full JID can be discovered by the room owner only; contrast with Fully-Anonymous Room and Non-Anonymous Room.

Non-Anonymous Room -- a room in which an occupant's full JID is exposed to all other occupants; contrast with Semi-Anonymous Room and Fully-Anonymous Room.

active -- room that is currently in use

adjourned -- 'saved' room

There are three different match status:

created -- before the initial room configuration is done

inactive -- before and after a match, turns are not possible, options can be changed

active -- within a match, turns are possible, options cannot be changed

paused -- halted within a match, turns are not possible, options cannot be changed

Most of the examples in this document use the scenario of Miranda and Ferdinand playing chess in Act V, Scene I of Shakespeare's The Tempest, represented here as the "island-chess@games.shakespeare.lit" room. The characters are as follows:

Room NicknameFull JIDAffiliationGame Role
damselmiranda@shakespeare.lit/desktopOwnerWhite
ladferdinand@shakespeare.lit/laptopNoneBlack
KingOfNaplesalonso@shakespeare.lit/pdaNoneNone
prosperoprospero@shakespeare.lit/cellNoneNone

The following affiliations are defined:

  1. Member
  2. Owner
  3. None (the absence of an affiliation)

Support for the all affiliations is REQUIRED. (The "None" affiliation is the absence of an affiliation.)

If a user without a defined affiliation enters a match, the user's affiliation is defined as "None".

The member affiliation provides a way for room owners to specify a "whitelist" of users who are allowed to enter a members-only match. When a member enters a members-only match, his or her affiliation does not change.

Information about affiliations MUST be sent in all presence stanzas generated or reflected by the match and sent to occupants.

Owners are allowed to do what they like (saving/loading, change match options, etc.) except in unmoderated matches. This match type restricts the use of owner privileges to specific room statuses. Users with no affiliation SHALL NOT enter members-only matches. Besides that, these users have the same privileges as members.

Room Type Configure Save/Load Grant Member Revoke Member Assign Role Revoke Role
moderated match inactive all status all status all status all status all status
unmoderated match inactive inactive all status inactive inactive and paused inactive and paused

The ways in which a user's affiliation changes are well-defined. Sometimes the change results from the user's own action (e.g., registering as a member of the match), whereas sometimes the change results from an action taken by an owner. If a user's affiliation changes, a MUG service implementation MUST change the user's affiliation to reflect the change and communicate that to all occupants.

A MUG implementation MUST support &xep0030;, &xep0128; and &xep0055;.

A Jabber entity may wish to discover if a service implements the Multi-User Game protocol; in order to do so, it sends a service discovery information ("disco#info") query to the service's JID:

]]>

The service MUST return its identity and the features it supports:

]]>

The service discovery items ("disco#items") protocol enables a user to query a service for a list of associated items, which in the case of a game service would consist of the active game rooms hosted by the service.

]]>

The service SHOULD return a full list of the active and public rooms it hosts.

]]>

If the full list of rooms is large (see &xep0030; for details), the service MAY return only a partial list of rooms. If it does so, it SHOULD include a <set/> element (as defined in &xep0059;) to indicate that the list is not the full result set.

It is RECOMMENDED that a user uses &xep0055; to search for active or adjourned rooms. At first the user needs to discover what search fields are supported by the service:

]]>

The service MUST then return the possible search fields to the user, and MAY include instructions:

Use the enclosed form to search. If your Jabber client does not support Data Forms, visit http://web.games.shakespeare.lit/ Room Search Please provide the following information to search for active or adjourned matches. jabber:iq:search ]]>

The Saved Room option allows to search for active or adjourned rooms (see Room Status). The Game Category field is to classify the game and to be able to only search for certain types of games. Every game protocol MUST define its category in the corresponding game XEP.

After having received the possible search fields, the user MAY then submit a search request, specifying values for any desired fields:

jabber:iq:search active http://jabber.org/protocol/mug/chess ]]>

The submitting entity MAY submit the 'category' or 'game' field but MUST NOT submit both. Sending an empty form adds up to searching for all games.

The service SHOULD then return a list of search results that match the values provided:

jabber:iq:search active board http://jabber.org/protocol/mug/chess island-chess@games.shakespeare.lit ... ]]>

If the full list of rooms is large, the service MAY return only a partial list of rooms. If it does so, it SHOULD include a <set/> element (as defined in &xep0059;) to indicate that the list is not the full result set.

Using the disco#info protocol, a user may also query a specific room for more detailed information about the room. A user MAY do so before entering a room in order to discover the room configuration.

type='get'> ]]>

The room then MUST return its identity and the features it supports.

http://jabber.org/protocol/mug#matchinfo http://jabber.org/protocol/mug/chess A lovers match 2 2 5 xmpp:island-chess@conference.shakespeare.lit?join ]]>

A room MUST also return more detailed information in its disco#info response using &xep0128;, identified by inclusion of a hidden FORM_TYPE field whose value is "http://jabber.org/protocol/mug#matchinfo". It MUST include a 'mug#game' field specifiying the namespace of the game. Optional information MAY include a more verbose description of the room and the current number of occupants and players in the match or 'mug#match_chat' field specifiying a URI for the chat. This is usually a &xep0045;.

See Room Types for details.

A user MAY also query a specific match for its associated items (occupants):

]]>

An implementation MAY return a list of existing occupants if that information is publicly available, or return no list at all if this information is kept private.

]]>

Note: These <item/> elements are qualified by the disco#items namespace, not the mug namespace; this means that they cannot possess 'role' attributes, for example.

]]>

If a non-occupant attempts to send a disco request to an address of the form &ROOMJID;, a MUG service SHOULD return the request to the entity and specify a &badrequest; error condition. If an occupant sends such a request, the service MAY pass it through the intended recipient.

A Jabber user may want to discover if one of the user's contacts supports the Multi-User Game protocol. This is done using Service Discovery.

]]>

The client SHOULD return its identity and the features it supports:

... ... ]]>

A user may also query a contact regarding which room the contact is in. This is done by querying the contact's full JID (<user@host/resource>) while specifying the Service Discovery node 'http://jabber.org/protocol/mug#matches':

]]>

The requested client MAY list the active rooms as response; see the Implementation Guidelines section of this document for details.

]]>

Optionally, the contact MAY include its room nick as the value of the 'name' attribute:

... ]]>

The client MAY implement &xep0196; to announce running games. To publish a running game the user sends:

A lovers match lad Shakespeare Gaming Service games.shakespeare.lit xmpp:island-chess@games.shakespeare.lit?play;game=http://jabber.org/protocol/mug/chess ]]>

When the user stops playing the game (i.e. leaves the game room), the user's client SHOULD send an empty &GAME; element with the same ItemID:

]]>

It can be useful to invite other users to a room in which one is an occupant. To do this, a MUG client sends XML of the following form to the &ROOM; itself adding an &INVITE; element for every invitee. (the reason is OPTIONAL and the message MUST be explicitly or implicitly of type "normal"):

Hey Alonso, this is the game of your son! ]]>

The &ROOM; itself MUST then add a 'from' address to the &INVITE; element whose value is the room JID of the invitor and send the invitation to the invitee specified in the 'to' address. The room SHOULD add the password if the room is password-protected:

Hey Alonso, this is the game of your son! cauldronburn ]]>

If the room is members-only, the service MAY also add the invitee to the member list. If the invitor supplies a non-existent JID, the room SHOULD return an ¬found; error to the invitor. The invitee MAY choose to formally decline (as opposed to ignore) the invitation; and this is something that the sender may want to be informed about. In order to decline the invitation, the invitee MUST send a message of the following form to the &ROOM; itself:

Sorry, I'm too busy right now. ]]> Sorry, I'm too busy right now. ]]>

Invitations MAY be based on room JIDs rather than bare JIDs (so that, for example, an occupant could invite someone from one match to another without knowing that person's bare JID). Thus the service MUST handle both the invites and declines.

A User enters a room as follows:

]]>

The service MAY assign a free role to the user.

If the service is able to add the user to the room, it MUST send presence from all the existing occupants' room JIDs to the new occupant's full JID, including extended presence information about roles in a &GAME; element qualified by the 'http://jabber.org/protocol/mug' namespace and containing an &ITEM; child with the 'affiliation' attribute set to a value of "owner", "member", or "none" as appropriate:

active ... ]]>

The service MUST also send the new occupant's presence to all occupants including the new occupant. If a role was assigned to the new occupant, it MUST be included in the presence in order to notify the new and all other occupants about the new occupant's role.

]]> ]]>

Note: The order of the presence stanzas sent to the new occupant is important. The service MUST first send the complete list of the existing occupants to the new occupant and only then send the new occupant's own presence to the new occupant. This helps the client know when it has received the complete "room roster".

If the room is non-anonymous, the service MUST send the new occupant's full JID to all occupants using extended presence information in an &GAME; element qualified by the 'http://jabber.org/protocol/mug' namespace and containing an &ITEM; child with a 'jid' attribute specifying the occupant's full JID:

[...] ]]>

If the room is semi-anonymous, the service MUST send presence from the new occupant to all occupants as specified above, but MUST include the new occupant's full JID only in the presence notifications it sends to the room owner and not to any other occupant.

If the room is fully-anonymous, the service MUST send presence from the new occupant to all occupants as specified above, but MUST NOT include the new occupant's full JID to any other occupant.

If the room requires a password and the user did not supply one (or the password provided is incorrect), the service MUST deny access to the room and inform the user that they are unauthorized; this is done by returning a presence stanza of type "error" specifying a ¬authorized; error:

]]>

Passwords SHOULD be supplied with the presence stanza sent when entering the room, contained within an <game/> element qualified by the 'http://jabber.org/protocol/mug' namespace and containing a <password/> child. Passwords are to be sent as cleartext; no other authentication methods are supported at this time, and any such authentication or authorization methods shall be defined in a separate specification (see the Security Considerations section of this document).

brave new world ]]>

If the room is members-only but the user is not on the member list, the service MUST deny access to the room and inform the user that they are not allowed to enter the room; this is done by returning a presence stanza of type "error" specifying a ®istration; error condition:

]]>

If the room already contains another user with the nickname desired by the user seeking to enter the room (or if the nickname is reserved by another user on the member list), the service MUST deny access to the room and inform the user of the conflict; this is done by returning a presence stanza of type "error" specifying a &conflict; error condition:

]]>

However, if the bare JID &USERJID; of the present occupant matches the bare JID of the user seeking to enter the room, then the service SHOULD allow entry to the user, so that the user has two (or more) in-room "sessions" with the same roomnick, one for each resource. If a service allows more than one occupant with the same bare JID and the same room nickname, it SHOULD route in-room messages and presence to all of the user's resources and allow all of the user's resources to send messages to the room; it is up to the implementation to determine how to route private messages to all or only one resource (based on presence priority or some other algorithm).

If the room has reached its maximum number of occupants, the service SHOULD deny access to the room and inform the user of the restriction; this is done by returning a presence stanza of type "error" specifying a &unavailable; error condition:

]]>

Alternatively, the room could kick an "idle user" in order to free up space.

If a user attempts to enter a room while it is "locked" (i.e., before the room creator provides an initial configuration and therefore before the room officially exists), the service MUST refuse entry and return an ¬found; error to the user:

]]>

If the room does not already exist when the user seeks to enter it, the service SHOULD create it; however, this is not required, since an implementation or deployment MAY choose to restrict the privilege of creating rooms. For details, see the Creating a Room section of this document.

When a user wants to take a free role, he sends the following presence to &ROOM;.

]]>

After the role has been successfully assigned to the requesting occupant, the service MUST send the new presence to all occupants.

]]> ]]>

If the role is already taken, the service must return the following error.

]]>

If the requested role doesn't exist in the match, the service MUST return a not-acceptable error.

After the match is ready to be started (as to be defined by the game protocol), all players MUST send start messages in order to start the game.

]]>

In order to see what players are ready to start, the service MUST reflect the start message from each player to all players.

]]>

If the match is not ready, the service MUST send the following error.

]]>

After the service received messages from all players, it MUST update the match status from inactive to active by a presence broadcast to all occupants. If the owner changes the configuration or roles change after a player sent his message and before the service sends presence broadcast indicating the game status active, the player MUST send the message again.

active ... active ... active ... ]]>

Note that the spectator alonso recieves the start presence, too.

In order to make a move in a match, a &MESSAGE; stanza MUST be send to &ROOMJID; containing a &TURN; element qualified by 'http://jabber.org/protocol/mug#user' namespace. Game protocols SHOULD place own elements defining the turn inside the &TURN; element.

]]>

A service MUST validate the player's move before passing it to the occupants. If the turn is invalid, as defined by the game protocol, the service MUST return an error and kick the player unless the player is the owner of the room, in which case he SHOULD lose his game role.

]]>

If a spectator sends a turn the service MUST return the following error.

]]>

If a player sends a turn while the match status is 'inactive' or 'paused' the service MUST send this error:

]]>

If the move is valid, the service MUST distribute the turn. The occupants, who receive the turn are defined by the game protocol. However, the turn MUST be reflected to the sender.

]]>

If a client wants to resign, he sends the following.

]]>

Afterwards, the service decides whether to cancel or pause the match based on the game specification.

The game protocol respectively the game protocol implementation decides when a match is over. In the case of game termination, the service MUST notify every player through updated presence including the resulting final state.

inactive Black inactive Black inactive Black ]]>

To change his nickname, an occupant sends the following presence.

]]>

The service must send the updated presence to all occupants.

]]>

If the room already contains another user with the nickname the same rules apply as on entering a room.

Since each occupant has a unique room JID, an occupant MAY send a "private message" to a selected occupant via the service by sending a message to the occupant's match JID. The message type SHOULD be "chat", or MAY be left unspecified (i.e., a normal message). This privilege SHOULD be allowed to any occupant (even a spectator in a moderated room).

Sweet lord, you play me false. ]]>

The service is responsible for changing the 'from' address to the sender's match JID and delivering the message to the intended recipient's full JID.

Sweet lord, you play me false. ]]>

If the sender attempts to send a private message to a room JID that does not exist, the service MUST return an ¬found; error to the sender.

If the sender is not an occupant of the room in which the intended recipient is visiting, the service MUST return a ¬acceptable; error to the sender.

If allowed in accordance with room configuration, an occupant MAY be allowed to retrieve the list of room members. For details, see the Modifying the Member List section of this document.

In order to exit a multi-user game room, an occupant sends a presence stanza of type "unavailable" to the &ROOMJID; it is currently using in the room.

]]> ]]>

If the leaving occupant had a role that was indispensable, the service MUST pause or cancel the game.

from='island-chess@games.shakespeare.lit' to='ferdinand@shakespeare.lit/laptop'> from='island-chess@games.shakespeare.lit' to='miranda@shakespeare.lit/desktop'> ]]>

To resume the game, all players have to send <start/> messages again.

inactive inactive ]]>

To create a room a user sends the following presence to the room.

to='island-chess@games.shakespeare.lit/damsel'> ]]>

If the priviledge to create a room is restricted to certain users and the room cannot be created, the service MUST reply with the following error.

]]>

If a game element or the var attribute with the game namespace is missing then the service MUST deny creating a room and send a presence with a bad request error back to the user.

If this user is allowed to create a room and the room does not yet exist, the service MUST create the room according to some default configuration, assign the requesting user as the initial room owner, and add the owner to the room but not allow anyone else to enter the room (effectively "locking" the room). The initial presence stanza received by the owner from the room MUST include extended presence information indicating the user's status as an owner and acknowledging that the room is awaiting configuration and that the initial match status is 'created'.

created to='miranda@shakespeare.lit/desktop'> ]]>

The role attribute is only necessary if the service assignes roles automatically.

To request a room with the default configuration the owner sends the following query.

]]>

If the user wants to configure the room, he MAY first request the configuration form.

]]>

If no configuration is possible, the service MUST return the following error.

]]>

The service then sends the initial configuration form to the user.

Configuration for "Island Chess" Room Your room island-chess@games.shakespeare.lit has been created! The default configuration is as follows: - Moderated and public room - Up to 20 occupants - No password required - No invitation required To accept the default configuration, click OK. To select a different configuration, please complete this form. http://jabber.org/protocol/mug#matchconfig moderated 0 20 1 0 semi-anonymous 0 If a password is required to enter this room, you must specify the password below. You may specify a URL for a communication resources such as a MUC chat, a video chat or an IRC chat, leave it empty for no chat or leave it up to the server to create one. Configuration for Chess Game The default configuration is as follows: - Classic Chess To accept the default configuration, click OK. To select a different configuration, please complete this form. type='hidden' http://jabber.org/protocol/mug/chess#chessconfig classic ... ]]>

To finish the configuration, the user MUST submits the completed form to the service.

http://jabber.org/protocol/mug#roomconfig A lovers room The Chess Match at Act V, Scene IV of Shakespeare's The Tempest moderated 0 5 1 0 semi-anonymous 1 bravenewworld http://jabber.org/protocol/mug/chess#chessconfig classic ... ]]>

In addition to the room configuration, the user MAY also supply a custom initial state for the match.

... ... ... ]]>

Valid states are defined by the game protocol and may consist of the explicit current state in form of a data form or the series of turns that led to the state.

If the room creation fails because the specified room configuration options violate one or more service policies (e.g., because the password for a password-protected room is blank), the service MUST return a <not-acceptable/> error.

]]>

Alternatively, the room owner MAY cancel the configuration process:

]]>

If the room owner cancels the initial configuration, the service SHOULD destroy the room, making sure to send unavailable presence to the room owner (see the "Destroying a Room" use case for protocol details).

The owner may change the configuration whenever the match status is 'inactive'.

]]> Configuration for "Island Chess" Room To select a different configuration, please complete this form. http://jabber.org/protocol/mug#roomconfig A lovers match The Chess Match at Act V, Scene IV of Shakespeare's The Tempest moderated 0 5 1 0 semi-anonymous 1 If a password is required to enter this room, you must specify the password below. bravenewworld Configuration for Chess Game The default configuration is as follows: - Classic Chess To accept the default configuration, click OK. To select a different configuration, please complete this form. type='hidden' http://jabber.org/protocol/mug/chess#chessconfig classic ... ]]>

If there are no configuration options available, the service MUST return an empty query element to the owner as shown in the previous use case.

The owner SHOULD then submit the form with updated configuration information.

If as a result of a change in the room configuration the room type is changed to members-only, any occupants MUST become members and the service MUST reflect the updated presence to all.

A room MUST send notification to all occupants when the room configuration changes. If the game configuration changed, the game MUST also specify an adequate match state.

inactive ... ]]>

The owner may save the room whenever the match status is 'inactive' and save the room including the match state in a moderated room.

type='result'> ]]>

If saving is allowed, the service MUST inform all occupants and remove them from the room.

]]> ]]>

After saving the room, nobody can join it until it is loaded by the owner.

For Discovering of Saved Rooms see search for rooms. Send an iq stanza to request loading a the room as follows:

]]>

After loading, the match status is 'paused' if the match was 'active' before saving. Alternatively, the match status is set to 'inactive' if the match was inactive. The service SHOULD send an invitation to all occupants that were present in the game when saved.

Players entering the room SHOULD be assigned the role they had when the room was saved.

In the context of a members-only match, the member list is essentially a "whitelist" of people who are allowed to enter the match. Anyone who is not a member is effectively banned from entering the match.

In the context of an open match, the member list is simply a list of users (bare JID and reserved nick) who are registered with the match. Such users may appear in a match roster, have their match nickname reserved, be returned in search results, and the like.

It is RECOMMENDED that only the room owner has the privilege to modify the member list in members-only rooms. To do so, the owner first requests the member list by querying the room for all users with an affiliation of "member":

]]>

Note: A service SHOULD also return the member list to any occupant in a members-only room; i.e., it SHOULD NOT generate a &forbidden; error when a member in the room requests the member list. This functionality may assist clients in showing all the existing members even if some of them are not in the room, e.g. to help a member determine if another user should be invited. A service SHOULD also allow any member to retrieve the member list even if not yet an occupant.

The service MUST then return the full member list to the owner qualified by the 'http://jabber.org/protocol/mug#owner' namespace; each item MUST include the 'affiliation' and 'jid' attributes and MAY include the 'nick' and 'role' attributes for each members that is currently an occupant.

]]>

The owner MAY then modify the member list. In order to do so, the owner MUST send the changed items (i.e., only the "delta") to the service; each item MUST include the 'affiliation' attribute (normally set to a value of "member" or "none") and 'jid' attribute but SHOULD NOT include the 'nick' attribute and MUST NOT include the 'role' attribute (which is used to manage game roles in a room):

]]>

The service MUST modify the member list and then inform the owner of success:

]]>

The service MUST change the affiliation of any affected user. If the user has been removed from the member list, the service MUST change the user's affiliation from "member" to "none". If the user has been added to the member list, the service MUST change the user's affiliation to "member".

If a removed member is currently in a members-only room, the service SHOULD kick the occupant by changing the removed member's affiliation to "none" and send appropriate presence to the removed member as previously described. No matter whether the removed member was in or out of a members-only room, the service MUST subsequently refuse entry to the user.

For all room types, the service MUST send updated presence from this individual to all occupants, indicating the change in affiliation by including an <game/> element qualified by the 'http://jabber.org/protocol/mug' namespace and containing an <item/> child with the 'affiliation' attribute set to a value of "none".

... ]]>

In addition, the service SHOULD send an invitation to any user who has been added to the member list of a members-only room if the user is not currently affiliated with the room, for example as an owner (such a user would by definition not be in the match; note also that this example includes a password but not a reason -- both child elements are OPTIONAL):

cauldronburn ]]>

While only the owner SHOULD be allowed to modify the member list, an implementation MAY provide a configuration option that opens invitation privileges to any member of a members-only match. In such a situation, any invitation sent SHOULD automatically trigger the addition of the invitee to the member list. However, if invitation privileges are restricted to the owner and a mere member attempts to a send an invitation, the service MUST deny the invitation request and return a &forbidden; error to the sender:

Hey Prospero, join the game! ]]>

Invitations sent through an open room MUST NOT trigger the addition of the invitee to the member list.

If a user is added to the member list of an open room and the user is in the room, the service MUST send updated presence from this individual to all occupants, indicating the change in affiliation by including an <game/> element qualified by the 'http://jabber.org/protocol/mug' namespace and containing an <item/> child with the 'affiliation' attribute set to a value of "member".

... ]]>

The room owner may decide to modify the assigned game roles in a room. To do so, the owner first requests a list of the occupants and assigned roles by querying the room:

]]>

Note: The role 'all' is a reserved name for querying the list of active players and MUST NOT be redefined by games for other purposes.

The service SHOULD then return the full list of all occupants qualified by the 'http://jabber.org/protocol/mug#owner' namespace; each item MUST include the 'role' and 'nick' attributes and MAY include the 'jid' and 'affiliation' attributes for each occupant in the room.

]]>

The service MUST send a &forbidden; error if the owner has not the required Privileges.

The owner MAY then modify the roles assigned by occupants. In order to do so, the owner MUST send the changed items (i.e., only the "delta") to the service; each item MUST include the 'roles' attribute and 'nick' attribute but SHOULD NOT include the 'jid' attribute and MUST NOT include the 'affiliation' attribute:

]]>

The service MUST modify the roles of the occupants and then inform the owner of success:

]]>

The service MUST change the roles of any affected user and MUST send updated presence to all occupants, indicating the changed role by including an <game/> element qualified by the 'http://jabber.org/protocol/mug' namespace and containing an <item/> child with the 'role' attribute.

... ]]>

The room owner may decide to transfer the ownership to another occupant.

]]> ]]> ... ]]>

OPTIONAL.

The following guidelines may assist client and component developers in creating MUG implementations.

  1. In order to allow supporting multiple games on the service the component may offer a game plugin interface.

  2. To manage team games, the service should offer game plugins an API and leave game turn message routing to the game plugins.

  3. In case of loading a room the service SHOULD remember each player's role, so it can assign the roles properly when the room is loaded.

  4. The game service MAY offer a managed multi-user chatroom. This can be done by creating a new chat room and keep membership synchronized with the game room.

  1. In order to respect the users privacy the jabber client SHOULD hide active matches for discovering as default behavior. However jabber clients MAY offer a setting to enable the active match discovery.

  2. MUG clients MAY highlight users that participate in a room chat somehow. The highlighting could be done with a small speech balloon icon behind the players name.

OPTIONAL.

REQUIRED.

REQUIRED.

If this protocol will be accepted by the XMPP Standards Foundation, the ®ISTRAR; should includes the following information in its registries.

The XMPP Registrar includes the following MUG-related namespaces in its registry of protocol namespaces:

  • http://jabber.org/protocol/mug
  • http://jabber.org/protocol/mug#user
  • http://jabber.org/protocol/mug#owner

A Multi-User Game service or match is identified by the "game" category and the "multi-user" type within Service Discovery.

There are many features related to a MUG service or match that can be discovered by means of Service Discovery. The most fundamental of these is the 'http://jabber.org/protocol/mug' namespace. In addition, a MUG match SHOULD provide information about the specific match features it implements, such as password protection and match moderation.

The "play" querytype is registered as a MUG-related action, with keys of "game" and "password".

The application MUST either present an interface enabling the user to provide a room nickname or populate the room nickname based on configured preferences or nickname discovery.

If the application doesn't know the game namespace of the room it MUST query for room information to receive the game namespace.

]]>

In order to avoid sending the service discovery query, the play action SHOULD include the game namespace for the room.

The play action MAY include a password for the room. Naturally, access to a URI that includes a room password MUST be appropriately controlled.

brave new world ]]>

The following submission registers the "play" querytype.

play http://jabber.org/protocol/mug enables joining a multi-user game room XEP-XXXX game the game namespace required to enter a multi-user game room password the password required to enter a multi-user game room ]]>
]]> ]]> ]]>