From Pandora Wiki
Revision as of 14:32, 3 May 2013 by Skeezix (talk | contribs) (Getting the Score Board)
Jump to: navigation, search

Compo4All API Guide


All information from the server is transfered by the HTTP protocol, so you can use libraries such as libcurl to handle all that work. Information is passed using the JSON markup language

Launcher Developer

Getting the Games List

Sending a HTTP GET request to /curgamelist_1 will return you a list of games, and details of those games

The JSON response will be an array of dictionairies (one dictionairy per game.)

The dictionaries will include at least the following fields for each game:

 - gamename -> the 'short name' of the game; for MAME, it is the driver name ('dkong') and not generally for display; it is a unique-id (unique within C4A)
 - longname -> the readable display name ('Donkey Kong')
 - status -> current status options include:
   - available -> show in frontends, available for scoring etc
   - active -> show in frontends (and highlight or in their own tab?), is actively in the ROT tournament or highlight right now (but is otherwise same as available)
   - wip -> do not show in frontend; available for scoring and functionality identical to 'active', but for developers to test their code prior to finalization
 - genre -> the 'type' of game (at a high level); current values are..
   - platform
   - maze
   - runngun
   - shmup
   - strategy
   - ... we can add more - to be determined
 - field -> the 'kind' of game it is, the platform; current values are
   - arcade -> implies c4a-mame will be used
   - indie -> means standalone; it will contact c4a, but not be part of c4a-mame
   - TBD

Getting the Score Board

Requesting /json_1/(gamename) will return you scoreboard details


 - You can also pull a simple HTML (ASCII) dump:
 - Getting previous months can use backdating for both JSON and ASCII pulls; for example:


The scoreboard is an array of dictionairies, one dict per score entry.

The dictionairies will include at least:

 - shortname -> the player's shortname (initials)
 - longname -> the player's long name (display name)
 - hi -> the actual score number (for single-score style of games); TBD for time-attack, and other kinds of games
 - time -> the epoch time the event occured

Game Developer

Spaghetti Client

The Spaghetti Client can be downloaded from the thread, and you can easily submit scores by starting a process with the following command line (assuming sc is bundled in your working directory)


SC Modes

Mode Description
so Sends the Score only

SC Operations

Operation Description
push Sending data to the server
pull Get data from the server (not implemented)