My favorites | Sign in
Project Logo
                
Search
for
Updated Jul 31, 2008 by keeyai
Labels: Featured, Phase-Deploy
configfile  
CGL Config Files - How to add your game info to CGL

CGL Config Files

CGL will manage and play any game, whether it is designed for CGL or not. However, to get the full CGL functionality (author info, judging, dependencies, screenshots), the author needs to create a simple xml file called gameinfo.xml and place it in the main game folder. Creating the XML is extremely easy - just copy the contents below and put your own game information in the relevant tags. There are two versions below - the HEAVILY commented, fully expanded one, and the condensed one below it. They do the same thing, but you may want to start with the commented version because of the built in instructions.

Most of the tags are self explanatory and optional. CGL will do its best to fill in any information you leave out, but you're always better off filling it in yourself. As you can see from the condensed version below, all the single tags can be expressed as attributes of their parents. The following tags can all be repeated as many times as necessary: author, dependency, screenshot, and entrypoint.

The most important part of the file are the entrypoint tags. Create one for each file you want the user to be able to run. The OS tags (windows, mac, linux) specify if that option should be shown to users on that system and should contain true or false. As an example you could offer an exe to windows users and source to mac and linux.

If no entry points are specified for the user's system, they will be presented with a file dialog to select which file to run. If they have one option, CGL will just run it when they click play game. If there are multiple, they will be presented with a dialog box in which they can select which of the options to run based on the entrypoint's label value.

For games that run in a web browser like flash games or facebook apps (yes, we have had those!), you can use the webpath attribute/tag inside an entrypoint instead of the path. This will show up with (web) appended to it in the entry point selection dialog and will open the specified URL in the user's default browser when clicked. In this way you can take advantage of all the CGL functionality (tracking, judging, readme, info, etc) fairly seamlessly without having a local file to run.

That's pretty much it! After filling out everything, save the file as gameinfo.xml in your game's main folder and you should be good to go.

Note: you should always test your game in CGL to make sure it runs and presents all your info how you want it to.

Heavily Commented, Fully Expanded

<!--
    Instructions:
    Fill in the tags with the applicable data from your game. Anything marked 'optional' can
    be safely ommitted. Save in your game's main folder as gameinfo.xml.

    To include multiple authors, dependencies, entry points, or screenshots, simply create additional tags.

    Notes:
        You can optionally include the paths to your readme and license files to make sure
        CGL finds them. If you do not, CGL will search common readme and license names and
        automatically import them. CGL will also search for image files in your main folder
        and display them if you provide no screenshot information.

        All paths are relative to your main game folder

        CGL will search for screenshots in the main game folder if you don't specify
        any.

        CGL will search for a thumbnail if you don't specify one. It will first look for
        any images files starting with 'thumb' or 'thumbnail', then try 'screenshot',
        then fall back to any image file it can find in the main folder.
-->
<?xml version="1.0" encoding="UTF-8" ?>
    <game>
        <name></name>           <!-- Name of the Game -->
        <version></version>     <!-- Version Number -->
        <url></url>             <!-- optional: URL to game page -->
        <judgeurl></judgeurl>        <!-- optional: URL to judging page for this entry-->
        <notes></notes>         <!-- Any notes you want for the game - displayed on overview -->
        <language></language>   <!-- optional: language written in -- if python, CGL will check dependencies -->
        <readmepath></readmepath>   <!-- optional: path to readme file - if left off CGL will search common readme names -->
        <licensepath></licensepath> <!-- optional: path to license file - if left off CGL will search common license names -->

        <entrypoint>            <!-- path to file - make one of these for EACH entry point file you want in CGL, for each OS -->
            <windows>true</windows> <!-- true/false if this entrypoint should be used on windows -->
            <mac>true</mac>         <!-- true/false if this entrypoint should be used on mac -->
            <linux>true</linux>     <!-- true/false if this entrypoint should be used on linux -->
            <label></label>     <!-- the 'name' of this entry point, like 'fullscreen' or 'level editor' -->
            <path></path>       <!-- the path to the entry point, relative to the main folder -->
            <webpath></webpath> <!-- use this instead of path if your game is on a webpage - CGL will open that page when the user clicks play game -->
        </entrypoint>

        <author>                <!-- optional: create an author tag for each author -->
            <name></name>       <!-- author's name -->
            <url></url>         <!-- optional: author website -->
            <contribution></contribution>   <!-- optional: sections auther worked on -->
        </author>

        <dependency>            <!-- optional: create a dependency tag for each dependent library -->
            <name></name>       <!-- library name -->
            <version></version> <!-- optional: library version -->
            <url></url>         <!-- URL for library or its download page -->
            <modulename></modulename> <!-- optional: for python games only - the module name CGL should test for -->
        </dependency>

        <thumbnailpath></thumbnailpath>            <!-- optional: thumbnail for the game list 64x64-->

        <screenshot>            <!-- optional: create a screenshot tag for each screenshot -->
            <title></title>     <!-- title of the shot -->
            <description></description> <!-- description of the shot -->
            <path></path>       <!-- path to screenshot - relative to main folder -->
        </screenshot>
    </game>

Condensed Version

<!--
    Instructions:
    Fill in the tags with the applicable data from your game. Anything marked 'optional' can
    be safely ommitted. Save in your game's main folder as gameinfo.xml.

    To include multiple authors, dependencies, entry points, or screenshots, simply create additional
    tags.

    Notes:
        You can optionally include the paths to your readme and license files to make sure
        CGL finds them. If you do not, CGL will search common readme and license names and
        automatically import them. CGL will also search for image files in your main folder
        and display them if you provide no screenshot information.

        All paths are relative to your main game folder

        CGL will search for screenshots in the main game folder if you don't specify
        any.

        CGL will search for a thumbnail if you don't specify one. It will first look for
        any images files starting with 'thumb' or 'thumbnail', then try 'screenshot',
        then fall back to any image file it can find in the main folder.
-->
<?xml version="1.0" encoding="UTF-8" ?>
    <game name="" version="" url="" judgeurl="" language="" readmepath="" licensepath="" thumbnailpath="">
        <notes></notes>         <!-- Any notes you want for the game - displayed on overview -->

        <!-- Define an entry point - relative to main folder or a web link -->
        <entrypoint windows="true" mac="true" linux="true" label="" path="" webpath="" />

        <!-- optional: create an author tag for each author -->
        <author name="" url="" contribution="" />

        <!-- optional: create a dependency tag for each dependent library -->
        <dependency name="" version="" url="" modulename=""/>

        <!-- optional: create a screenshot tag for each screenshot -->
        <screenshot title="" description="" path="" />

    </game>

Sign in to add a comment
Hosted by Google Code