Short

Configuration

JSON
{
    "options": {
        "game": {
            "width": 400,
            "height": 400,
            "use_reward_image": true,
            "default_lang": "fr"
        },
        "images": {
            "cover": {
                "x": 0,
                "y": 0,
                "z": 0
            }
        },
        "animations": {
            "iddle": {
                "x": 0,
                "y": 0,
                "z": 1,
                "width": 400,
                "height": 400,
                "nbImages": 1,
                "duration": 3000,
                "loop": true
            },
            "win": {
                "x": 0,
                "y": 0,
                "z": 0,
                "width": 400,
                "height": 400,
                "nbImages": 48,
                "duration": 2000,
                "loop": false
            },
            "lose": {
                "x": 0,
                "y": 0,
                "z": 0,
                "width": 400,
                "height": 400,
                "nbImages": 48,
                "duration": 2000,
                "loop": false
            }
        }
    },
    "texts": {
      "en": {},
      "fr": {},
      "nl": {}
    },
    "sounds": {},
    "images": {
      "sprite_iddle": GAME_URL + "/assets/short/iddle.png",
      "sprite_win": GAME_URL + "/assets/short/win.png",
      "sprite_lose": GAME_URL + "/assets/short/lose.png",
      "sprite_cover": GAME_URL + "/assets/short/overlay.png",
      "rewards": {}
    }
}

Options

Key
Type
Explanation
Default
width

Integer

Width of the canvas.

400

height

Integer

Height of the canvas.

400

use_reward_image

Boolean

Tells the game to use the reward image, or a default one (both must be provided).

true

default_lang

String

[PTF] Default language if unmatched language.

"fr"

Assets

Key
Size
Explanation
Default
sprite_iddle

400 x 400px

Top image before clicking on the game (should be 1 frame).

sprite_win

(400 * number of frames) x 400px

Image displayed once the game started, in case of a win and if use_reward_image is set to false (should have many frames).

sprite_lose

(400 * number of frames) x 400px

Image displayed once the game started, in case of a lose (should have many frames).

sprite_cover

400 x 400px

Background of the game.

Last updated