Penalty

Configuration

JSON
{
  "options": {
    "visible_hitbox": false,
    "number_of_shoot": 5,
    "time_between_shoot": 1000,
    "background": {
      "url": GAME_URL + "/assets/penalty/background.png",
      "height": 600,
      "width": 686
    },
    "ball": {
      "url": GAME_URL + "/assets/penalty/ball.png",
      "height": 50,
      "width": 50,
      "speed": 12
    },
    "keeper": {
      "active": true,
      "url": GAME_URL + "/assets/penalty/keeper.png",
      "height": 126,
      "width": 103,
      "offsetY": 10,
      "speed": {
        "min": 5,
        "max": 15
      }
    },
    "goal": {
      "url": GAME_URL + "/assets/penalty/goal.png",
      "url_foreground": null,
      "height": 216,
      "width": 400,
      "offsetY": 25,
      "paddingX": 35,
      "floorLine": 100,
      "scoreLine": 65,
      "scoreLineOffsetY": 0
    },
    "board": {
      "url": GAME_URL + "/assets/penalty/board.png"
    },
    "default_lang": "fr"
  },
  "texts": {
    "en": {
      "shoot": "Shots: ",
      "score": "Goals: "
    },
    "fr": {
      "shoot": "Tirs : ",
      "score": "Buts : "
    },
    "nl": {
      "shoot": "Kicks: ",
      "score": "Goals: "
    }
  },
  "sounds": {},
  "images": {
    "rewards": {}
  }
}

Options

Key
Type
Explanation
Default
visible_hitbox

Boolean

[DEV] Display the hitboxes.

false

number_of_shoot

Integer

Number of times a player can "shoot" the ball.

5

time_between_shoot

Integer

Delay between each "shoot".

1000

background > height / width

Integer

Background's visual sizes.

600 / 686

ball > height / width

Integer

Ball's visual sizes (to render).

50 / 50

ball > speed

Integer

Speed of the ball.

12

keeper > active

Boolean

[Do not edit] Set to false to disable the keeper.

true

keeper > height / width

Integer

Keeper's visual sizes (to render).

126 / 103

keeper > offsetY

Integer

Vertical adjustment of the keeper.

10

keeper > speed > min / max

Integer

Speed of the keeper (is random between min and max at each "shoot").

5 / 15

goal > height / width

Integer

Goal's visual sizes (to render).

216 / 400

goal > offsetY

Integer

Vertical adjustment of the goal.

25

goal > paddingX

Integer

Horizontal padding for the goal. (the ball will bounce of those areas).

35

goal > floorLine

Integer

Ground level (if no goal).

100

goal > scoreLine

Integer

Score level (if goal).

65

goal > scoreLineOffsetY

Integer

[Do not edit, used in PaperToss]

0

default_lang

String

[PTF] Default language if unmatched language.

"fr"

shoot

String

Text displayed in the header.

"Shots: "

score

String

Text displayed in the header.

"Goals: "

Assets

Key
Size
Explanation
Default
background > url

~600 x 600px (adapt background sizes)

Background of the game.

ball > url

50 x 50px

Visual of the ball.

keeper > url

~100 x 125px (adapt keeper sizes)

Visual of the keeper.

goal > url

~400 x ...px (adapt goal sizes)

Visual of the goal.

goal > url_foreground

/

[Do not edit, used in PaperToss]

/

board > url

~400 x 200px

Visual of the scoreboard.

Last updated