Browser Games Hub
From Neuron Interactive
Contents |
Browser Games Hub
Browser Games Hub is a bunch of standardized API's that allow third party websites to access up to date game information from browser games. For more information, take a look at the website.
If you use an XML developers kit, you are probably interested in the XML schema.
People who want to integrate browser games in their site should take a look at the Integration Guide.
Information API
The basic layout of the XML is:
<browsergameshub version="0.1" revisit="1" min-width="750" min-height="200"> <name>Your game name</name> <site_url>http://www.your-url.com/<site_url> </browsergameshub>
Required information
- name should be unique on the system
- site_url is where the users will be redirected too
Attributes
- version = the version of the XML schema, don't change.
- revisit = how many days should be between 2 visits
- min-width & min-height: the minimal width & height required to play your game.
Additional information:
- descriptions should contain a list of description elements. Every element should have a "lang" attribute.
Descriptions example:
<browsergameshub version="0.1" revisit="1"> <name>Your game name</name> <site_url>http://www.your-url.com/<site_url> <descriptions> <description lang="en">Your description</description> </descriptions> </browsergameshub>
- genre: strategy | rpg | simulator
- setting: misc | stone age | ancient world | middle age | fantasy | pirates | machine age | gangster | present time | future | space | underwater
- effort: low | average | high
- players: (int) total amount of players
- age_recom: age recommendations
- logo_url: URL to game logo (can be up to 100x100 pixels JPEG, GIF or PNG)
- status: planning | development | alpha | beta | rc | release
- payment: is your game free or is there a monthly fee? free | monthly | optional
- servers: (see example)
- screenshot: (see example)
- timing: realtime | ticks | rounds
- languages: a list of language elements
- xml_url can be used if you move your XML to another location. If xml_url is detected, the xml information will be removed and a new entry for xml_url will be added.
- developer and publisher can be used to publish the name, site, email and/or logo of publisher and developer. These elements should contain at least contain a name element and can hold a site_url, email and logo_url element.
- banner_url may contain the URL of a regular 468x60 px banner.
Please mind that some websites will only accept games in certain languages, so try providing as much translations as you can. A text element without a lang attribute should contain English text!
Servers
You can provide a list of game servers in the information XML:
<browsergameshub version="0.1"> <servers> <server group="Pool A"> <id>Server ID</id> <name>Server 2</name> <version>0.230</version> <game_url>http://testing.neuroninteractive.com/</game_url> <ranking_url>http://testing.neuroninteractive.com/api/ranking/?output=xml</ranking_url> <openid_url>http://testing.neuroninteractive.com/openid/login/?openid_url=%s</openid_url> <players>25</players> <status>open</status> <descriptions> <description lang="en">speed 1x</description> </descriptions> </server> </servers> </browsergameshub>
Required elements:
- name
- game_url
Optional:
- group can be used to group your servers (optional)
- openid_url can be used for the "1-click register" technique if your game supports OpenID (optional)
- ranking_url should point to the Ranking API (as described below) (optional)
- status: contains the status of the server. Possible values are: open | closed | beta | full.
- lang: if this server supports only one language, define that language here. Servers will be grouped on lang and bestessays group.
Screenshots
You can provide screenshots of your game in the <screenshots> section:
<browsergameshub version="0.1"> <screenshots> <screenshot> <url>http://portal.dolumar.be/files/images/20080726195030247.jpg</url> <descriptions> <description lang="en">A description of the screenshot.</description> </descriptions> </screenshot> </screenshots> </browsergameshub>
Ranking API
For every server, you can define a Ranking API URL. This API should return a list of all players on that server. More documentation will be released soon, but at the moment you can base your API on this little example. "openid_hash" should contain an MD5 of the players OpenID url, if available.
<browsergameshub version="0.1"> <players> <player> <name>Daedeloth</name> <score>260</score> <openids> <openid hash="md5">de0f3dcc69a3078fb98d66527d486747</openid> </openids> <join_date>2008-09-16 00:03:07</join_date> </player> <player> <name>Dharkan</name> <score>230</score> <openids /> <join_date>2008-09-16 12:43:15</join_date> </player> </players> </browsergameshub>
OpenID
It is possible to provide direct links to your OpenID API to allow users to login in one click. For every server, you can define an openid_url that should contain a place keeper (%s) for the users OpenID account. Special providers will then automatically fill in the users identity, allowing the users to start playing your game in just a few seconds.
When your game supports OpenID, you can also implement our Notification API and Profile Box API.
