Game Finder

Volity's game finder allows players to quickly list and locate games. Like the UI finder, it is a bookkeeper-hosted information directory that client applications access through service discovery.

Through the game finder, Volity users can use their client applications to:

Discovering rulesets

Easy: send a disco items query to the bookkeeper, node rulesets. You'll get back a list of node pointers, one for every ruleset the bookkeeper knows about. (And, as it happens, each node will be exactly named after its ruleset's URI.)

Performing an info query on any of these nodes results in two fields (note that they have no provisions for internationalization at this time):

name
A very brief human-readable name for this ruleset. Example: Crazy Eights
description
A brief human-readable description of this ruleset. Example: The classic card game of Crazy Eights, similar to the commercial game Uno.
uri
This ruleset's URI.
homepage
Optional. A URL leading to a Web page with more information about this ruleset, such as human-friendly rules.

NOTE: This solution is not very scalable. Should Volity succeed in becoming popular among game hackers, this list of registered rulesets could grow too long to manage (even if filtered by those who actually have the support of active parlors)! It will do for the nonce, but in the future, the bookkeeper might organize the list into subcategories or the like. I will handwavingly suggest that this future bookkeeper will compare protocol version numbers to know when not to do this for a backwards client. (jmac)

Discovering parlors

Perform a disco items query on one of those nodes, appending the string |parlors to the node name. (That's "pipe-parlors".) Returns a list of further disco nodes on the bookkeeper, each named after a parlor's JID.

Toss each node a disco info request to receive a short form with this field:

reputation
This server's score on the reputation system. Not yet implemented, though...

For convenience, sending a disco items request to one of these nodes returns a pointer to the sever's actual JID, but since the node is a string that exactly matches the server's JID, a client can just use that information instead.

Sending a disco info request to the parlor itself (via its real JID) results in a different data form, this time with the following fields:

ruleset
This server's ruleset URI.
ruleset-version
The version number of the ruleset which this server supports.
description
A human-readable description of this server. (Might be blank.)
website
A URL of a website holding more information about this server. (Might be blank.)
volity-version
The version number of the Volity platform which this server supports.

Why is each parlor's information split across two separate locations: the bookkeeper, and the parlor itself? While the parlor can describe itself adequately, it needs the bookkeeper to vouch separately for its quality and trustworthiness. As with every other facet of Volity's reputation system, all reputation information comes directly from the bookkeeper.

Discovering games (open tables)

Perform a disco items request on a parlor (not the bookkeeper), node open_games. You should get back a list of (possibly zero) pointers to referee JIDs.

You can then send a disco info request to each of these referees to receive a form with more information about its game:

parlor
The JID of this referee's parlor. (Which you probably already know, at this point, but back-pointers are nice.)
table
The JID of this referee's table.
afoot
1 if the game is in play, 0 otherwise.
players
The number of occupied seats at the table.
max-players
How many seats this referee will allow.
language
The preferred human language for this table, expressed as a two-letter language code.
recorded
1 if the referee is recording games on the bookkeeper; 0 otherwise.
visible
1 if the table is visible to the game finder; 0 otherwise.

Discovering lobbies

See Lobby.

See Also

The volity.net game finder is an example of implementing the game finder as a separate application from the game-playing client. It communicates with the client by downloading volity files and (through MIME or extension-based magic) letting the user's OS pass them to the client.