githubEdit

Configuration Files

Using Existing Configuration Files

System configuration files are located at conf/sys/. The metadata of the system configureations will be introduced here.

Detection Area Configuration

  • area : It defines the detection areas for perception module.

    • id: For each area we define a unique id.

    • description : The area's description.

    • offset : The position in the upper left corner of the detection area.

    • size : The height and width of the detection area.

The areas' information is shown as the follow figure:(TODO: The figure.)

{
    "ver": "08",
    "area": [
        {
            "id": "0",
            "description": "Main Game Area",
            "offset": [0, 0],
            "size": [640, 480]
        }
    ]
}

Game Information Configuration

  • windowTitle: The window's title of the game.

  • windowSize: A list that contains all of the allowed window size.

  • mode: It defines the initial information (see the example below) of different mode. Plan to support custom practice such as thpracarrow-up-right.

Resource Configuration

  • resource: The resource information.

    • For each item, dir is the directory of the resource. TODO: type's discription.

Creating Your Own Configuration File

Create your configuration files in the conf/ directory. It contains various configurations in JSON format. We suggest you name your file as _<config_name>.json with the following structure:

circle-check

Then you can use the configuration file by decorating your class with @config_loader(<config_file>) and @register_config(<config_name>):

Check the Config section for more details on how to use the configuration files.

Last updated