This is a very early and uncomplete draft and do only exist for discussion purposes.
There's a lot of discussion around implementing a game library in XBMC Media Center. The challenge is to create a system that can handle game information for all platforms with less code. The games can be splitted into three main categories: Console games, arcade games and computer games. The communities and collection that allready exist are often focused on only one of these categories. The main reason for this is the diffence in how the games are distrubuted and on which hardware they're played, since this creates a small difference in the information structure.
Why should we bother to create this tool for storing game data?
I'm not aware of any good solution handle this kind of information between
platforms and different systems. This tool would make it possible to create
awsome informative and visual game libraries, not only in XBMC, but opens for
easy implementation for this in new and existing Media Centers and front
ends for almost all games ever made.
The goals is a tool making it possible to handle game library collection for all platforms without the need to handle platforms induvidually and creating a code base that can be shared between emulators and emulator front ends
The recommendation is built around two sets. One simple and one complete
Arcade game roms are dumps from a arcade machine, which makes the hardware and bios a important piece of the information. The most popular emulator around are MAME. MAME uses a specific romset for every version, and the roms might be depended on other roms/bios. Every game is a archive, and uses a short defined name, so the actual files must not be renamed.
Cabinet, flyers, marque, control pad and custom art works are in addition to screenshots (intro and action) the important graphical elements in a arcade rom collection
Hardware specifications are a important part of this for a lot of enthusiasts, so it would make sense to create space for this so this tool can be used outside XBMC for collections of sets by arcade game enthusiast also.
Unlike arcade games, console games are mainly distrubuted on a removable media such as cartridge, cd or dvd. It exist a lot of different dumps for each game, and there's many hacked roms, translated roms, alpha/beta- releases, and prototypesin addition to the different regions. The roms don't have any naming restrictions, so it is hard to determine a game from a badly named rom. There exist some commonly used naming convention, and some data-files identified by crc.
The typical scans wanted from the package of a console game are the front of the box or the cover, the back of the box or cover, the side of the box or cover, the label of the media and a introshot and a actionshot.
Computer games covers a broad specter of games. To clear things up, this tool will only cover games that have been published on a physical media.
There's alot of variations in media and packaging, not only across platforms, but also each platform. Commodore 64 used both tapes and 5,25" floppy disks, and the IBM-PC have used 5.25" and 3.5" floppy disk, cd-roms, dvd-roms and probably some other. Anyways it should generally be about the same graphical definition as for the console games.
To create a fully portable offline collection there are some parts that need file compensation. These are the thumbnail, preview and artworks elements. This is done by creating a standard structure and naming convention.
| filename | description |
|---|---|
| game.bin | Rom/Game |
| game.tbn | Thumbnail image. The tbn extension orginates from XBMC |
| game.nfo | A valid XGameML XML Document. The tbn extension orginates from XBMC, who used this to support reading info from the scene releases nfo |
| game-artwork.png/jpg | |
| game-altart.png/jpg | |
| game-extart.png/jpg | |
| game-mediaart.png/jpg | |
| game-introshot.png/jpg | Screenshot of the title screen |
| game-actionshot.png/jpg | Screenshot of the gameplay |
| game-video.avi/mpg | Preview of the gameplay |
| game-screenshot[N].png/jpg | Screenshot for game with number as a afix |
| game-fanart.png/jpg | HiRes images created for use as a backdrop |
| filename | description |
|---|---|
| DefaultIcon.png | The default icon for games in current path and child directories. Might be based on platform |
| DefaultFolder.png | The default folder icon for games in current path and child directories. Might be based on the platform or other grouping elements |
| folder.jpg | Works as a thumbnail for containing directory if directory are a root dir and you can't use a DirectoryName.tbn |
The file structure use cascading information storage. This makes it possible to store general information in one document and region specific information in another document
/root/
|---DefaultIcon.png
|---DefaultFolder.png
|---My roms.tbn
'---My roms/
| |---My rom.bin
| |---My rom.tbn
| |---My rom.nfo
| |---My rom-artwork.png
| |---My rom-altart.png
| |---My rom-extart.png
| |---My rom-mediaart.png
| |---My rom-introshot.png
| |---My rom-actionshot.png
| |---My rom-video.avi
| |---My rom-screenshot1.jpg
| '---My rom-screenshot2.jpg
|
'---My Other Roms/
|---folder.jpg
|---fanart.jpg
|---My Other Rom.bin
|---My Other Rom.tbn
|---My Other Rom-fanart.jpg
|---My Other Rom-artwork.png
|---My Other Rom[Region].bin
|---My Other Rom[Region]-artwork.png
|---My Other Rom[Region][Some][other][stuff].bin
'---My Other Rom[Region][Some][other][stuff].nfo
To determine platform from the filename a simple solution is to use file extensiosn as a identifiers. This requires each platform to have a unique extension. In most cases there allready exist a good scheme, but it may be some issues with images from cd and dvd where a cue is required. Renaming might break compability for various emulators.
MAME roms must use the common zip extension to work, so MAME necessarily must use the zip extension.
DOS games are fat16 directories requring a 8.3 filename. The best method be to create a archive for distrubution. What archive to use? For compability and avoid confusion, the archive should keep the common extension for that archive. e.g. rar and use a 8.3 filename
Another challenge with DOS games are the games executable. The root directory
of the game often contains two or more executable. One are the game, the other
commonly a setup. How to ensure that the game can be automaticlly launched
and correctly executable runned?
This must also be implemented in the emulators or launchers, but there must be
something to implement before that happens
This is not a specification, but a recommendation for the graphics added to a collection. This makes it simpler for people exchanging sets and secure a good ratio between size and quality.
There should be no watermarkings of the videos and images contained in a collection.
Videos should be encoded with widely supported codec and avoid formats as Windows Media Video, Real Media and QuickTime The best videos should be possible to run in a loop without breaking it up with a pause, intro, logo etc. Pure gameplay
What would be the best resolution for the different images?
To avoid a huge amount of repeating data, a simple way of inherit data are supported.
The super element are refered to by a URI with a fragment
e.g. ../mygames.nfo#supermario. The super element can exist in
the same document or in whatever location the URI points to.
The sub element are not complete without the super element, so if the super element don't exist the application should generate a warning
<library>
<game
id="supermarioworld2">
<title>Super Mario World 2</title>
<synopsis>Funny platform game</synopsis>
</game>
<game
id="snes_supermarioworld2"
inherit="#supermarioworld2">
<max-players>1</max-players>
</game>
<game
id="gen_supermarioworld2"
inherit="#supermarioworld2">
<title>Super Sonic World 2</title>
<max-players>2</max-players>
</game>
</library>
equals
<library>
<game
id="snes_supermarioworld2">
<title>Super Mario World 2</title>
<synopsis>Funny platform game</synopsis>
<max-players>1</max-players>
</game>
<game
id="gen_supermarioworld2">
<title>Super Sonic World 2</title>
<synopsis>Funny platform game</synopsis>
<max-players>2</max-players>
</game>
</library>
<ENTITY description "(
title |
synopsis |
teaser |
)*">
Attributes:
Attributes:
Attributes:
See: inheritance
Value: URI
remote-site can be used if a scraper
is embedded in the document
Contents: title?, base?, ( max-players | developers | publishers> | language | advanced | %sorting; | %grouping; | graphics | publisher | rated | languages | released )? | (%text;)* )>
Attributes:
See: platforms
Value: URI
Contents:
[CDATA] Name of platform for overiding name for id or to be used if pid = "OTHER"
CDATA: Number
When do you need to know the exact release date for a game?Different dates for different regions would also make this a lot of extra data not falling in the general game information.
If releases for regions differs over years, use the oldest release
Elements: perspective
Elements: genre
Elements: graphics
Elements: sountrack
Attributes:
Value: URI
Documents can store text in multiple languages.
Languages are set in the language attribute of the respective
elements. Use Country identification, such as en-US
(this usage is described in ISO 639)
<teaser language="en-US"> Don't be left behind in the race to save humanity.. Control Captain Gideon Wyeth in a exciting mission to greet the first alien culture ever known to man in this action packed game. </teaser>
| Platform | ID string |
|---|---|
| Not Defined | OTHER |
| Arcade | ARCADE |
| Nintendo | NES |
| Super Nintendo | SNES |
| Sega Genesis | GEN |
| Sega Master System | SMS |
| Windows | WIN |
| MS-DOS | DOS |
The general naming convention makes it possible to use the same naming for rom collections of both arcade roms, console roms, and games in general
For example: "main-art" could be boxart, or front cover on computer and console games, but migth rather be cabinet or marque for a arcade game
| name | Console/Computer games | Arcade games |
|---|---|---|
| main-art | box/cover-front | Marque |
| alt-art | box/cover-back | Flyer |
| ext-art | box/cover-side | ? |
| media-art | media label | cabinet |
<ENTITY graphics "(
thumbnail |
artwork |
screenshot |
video |
fanart
)*">
Attributes:
Value: a Uniform Resource Identifier, see [RFC2396]
Value: low|medium|high
default: defined by app
Attributes:
Value: normal|wide|3d
default: normal
Value: small|medium|large
default: medium
Attributes:
Attributes:
Value: Positive integer
Attributes:
Attributes:
Value: low|medium|high
default: low
Attributes:
Value: RGB/ARGB - "FFFFFF"/"FFFFFFFF"
Intended for Arcade Machine hardware specification and extended information for other collection
To define a set of default controls that fits different ways of rendering requires some logic.
<ELEMENT event (logic? | (instruction, logic?))> <ATTLIST event title CDATA #REQUIRED -- description of event -- alt CDATA #REQUIRED -- textual representation -- > <ELEMENT instruction EMPTY> <ATTLIST instruction unit CDATA #IMPLIED -- input unit used -- input CDATA #REQUIRED -- input from unit -- action (press|hold|move) "press" -- action performed on input -- direction (up|down|left|right|any) "any" -- sub instruction -- > <ELEMENT logic EMPTY> <ATTLIST logic type (and|or|while|for) "and" -- type of logic -- value CDATA #IMPLIED -- value for type of logic -- >
<event
title="Free view"
alt="hold button A while moving left thumbstick in any direction">
<instruction
action="hold"
input="button A"<
<logic
type="while">
<instruction
action="move"
input="left thumbstick"
direction="any">
</while>
</event>
Above markup may produce something like:
The manual could be in two formats. Either one pdf file or multiple images
Following show how to refer to a pdf manual hosted online:
<manual href="http://mydomain.com/manual/mygame.pdf" />
Manual consisting of several images:
<manual> <manpage page="1" href="http://mydomain.com/manual/mygame/1.jpg" /> <manpage page="2" href="http://mydomain.com/manual/mygame/2.jpg" /> </manual>
+Header1
++Header2
+++Header3
*listitem1
*listitem2
*listitem3
_bold text_
URI attribute values are Uniform Resource Identifiers (URIs), as defined in RFC 2396.