Slicer

Configuration

JSON
{
  "options": {
    "header_background_color": "black",
    "header_text_color": "white",
    "fruits": [
      {
        "name": "apple",
        "points": 5,
        "width": 62,
        "height": 59,
        "minimum_horizontal_speed": 1,
        "maximum_horizontal_speed": 2,
        "minimum_vertical_speed": 4,
        "maximum_vertical_speed": 5,
        "is_a_bomb": 0,
        "img_whole_src": GAME_URL + "/assets/slicer/apple-w.png",
        "img_Left_src": GAME_URL + "/assets/slicer/apple-l.png",
        "img_Right_src": GAME_URL + "/assets/slicer/apple-r.png",
        "img_Stain_src": GAME_URL + "/assets/slicer/apple-s.png"
      },
      {
        "name": "peach",
        "points": 5,
        "width": 66,
        "height": 66,
        "minimum_horizontal_speed": 1,
        "maximum_horizontal_speed": 2,
        "minimum_vertical_speed": 4,
        "maximum_vertical_speed": 5,
        "is_a_bomb": 0,
        "img_whole_src": GAME_URL + "/assets/slicer/peach-w.png",
        "img_Left_src": GAME_URL + "/assets/slicer/peach-l.png",
        "img_Right_src": GAME_URL + "/assets/slicer/peach-r.png",
        "img_Stain_src": GAME_URL + "/assets/slicer/peach-s.png"
      },
      {
        "name": "strawberry",
        "points": 10,
        "width": 68,
        "height": 72,
        "minimum_horizontal_speed": 1,
        "maximum_horizontal_speed": 2,
        "minimum_vertical_speed": 4,
        "maximum_vertical_speed": 5,
        "is_a_bomb": 0,
        "img_whole_src": GAME_URL + "/assets/slicer/strawberry-w.png",
        "img_Left_src": GAME_URL + "/assets/slicer/strawberry-l.png",
        "img_Right_src": GAME_URL + "/assets/slicer/strawberry-r.png",
        "img_Stain_src": GAME_URL + "/assets/slicer/strawberry-s.png"
      },
      {
        "name": "watermelon",
        "points": 1,
        "width": 98,
        "height": 85,
        "minimum_horizontal_speed": 1,
        "maximum_horizontal_speed": 2,
        "minimum_vertical_speed": 4,
        "maximum_vertical_speed": 5,
        "is_a_bomb": 0,
        "img_whole_src": GAME_URL + "/assets/slicer/watermelon-w.png",
        "img_Left_src": GAME_URL + "/assets/slicer/watermelon-l.png",
        "img_Right_src": GAME_URL + "/assets/slicer/watermelon-r.png",
        "img_Stain_src": GAME_URL + "/assets/slicer/watermelon-s.png"
      },
      {
        "name": "bomb",
        "points": 0,
        "width": 66,
        "height": 68,
        "minimum_horizontal_speed": 3,
        "maximum_horizontal_speed": 5,
        "minimum_vertical_speed": 4,
        "maximum_vertical_speed": 5,
        "is_a_bomb": 1,
        "img_whole_src": GAME_URL + "/assets/slicer/bomb-w.png",
        "img_Left_src": "",
        "img_Right_src": "",
        "img_Stain_src": GAME_URL + "/assets/slicer/bomb-s.png"
      }
    ],
    "lives": 3,
    "tutorial_fruit_number": 0,
    "tutorial_bomb_number": 4,
    "min_fruits_per_wave": 1,
    "max_fruits_per_wave": 3,
    "seconds_between_wave": 3,
    "gravity_strenght": 1,
    "height_percent_before_fall_start": 75,
    "cut_trail_width": 5,
    "cut_trail_color": "red",
    "fruit_missed_deduct_lives": false,
    "spawn_bombs": true,
    "fruit_bounce": true,
    "timer": 60,
    "text_police": "Arial",
    "overlay_width": 600,
    "overlay_height": 600,
    "default_lang": "fr"
  },
  "texts": {
    "en": {
      "score": "Score",
      "remaining_lives": "✕ ❤️",
      "time_left": "Time remaining",
      "tutorial_text_1": "Cut fruit to score points.",
      "tutorial_text_2": "Each bomb you cut costs you one life."
    },
    "fr": {
      "score": "Score ",
      "remaining_lives": "✕ ❤️",
      "time_left": "Temps restant ",
      "tutorial_text_1": "Coupez les fruits pour accumuler les points.",
      "tutorial_text_2": "Chaque bombe coupée vous fais perdre une vie."
    },
    "nl": {
      "score": "Score",
      "remaining_lives": "✕ ❤️",
      "time_left": "Resterende tijd",
      "tutorial_text_1": "Snijd vruchten om punten te scoren.",
      "tutorial_text_2": "Elke bom die je doorsnijdt kost je een leven."
    }
  },
  "sounds": {},
  "images": {
    "background_image": GAME_URL + "/assets/slicer/background.png",
    "tutorial_background_image": GAME_URL + "/assets/slicer/tuto-background.png",
    "gameover_image": GAME_URL + "/assets/slicer/game-over.png",
    "newgame_circle_image": {
      "en": GAME_URL + "/assets/slicer/new-game.png",
      "fr": GAME_URL + "/assets/slicer/new-game.png",
      "nl": GAME_URL + "/assets/slicer/new-game.png"
    },
    "rewards": {}
  }
}

Options

Key
Type
Explanation
Default
header_background_color
header_text_color

String

Colour / background of the header.

"black" / "white"

fruits []

Objects

Items that will need to be cut in half ("is_a_bomb": 0) or not ("is_a_bomb": 1).

[ {...} ]

lives

Integer

Number of lives before game over (= chances to miss).

3

tutorial_fruit_number

Integer

Indicates which item will be displayed in the tutorial as good.

0

tutorial_bomb_number

Integer

Indicates which item will be displayed in the tutorial as bad.

4

min_fruits_per_wave / max_

Integer

Amount of items that could be rendered at the same time.

1 / 3

seconds_between_wave

Integer

Delay between each new wave.

3

gravity_strenght

Integer

Strength of the items' gravity (y speed).

1

height_percent_before_fall_start

Integer

Height reached before the items start falling back (in percents).

75

cut_trail_width

Integer

Width of the cursor animation.

5

cut_trail_color

String

Colour of the cursor animation.

"red"

fruit_missed_deduct_lives

Boolean

Option to lose one live if a good item isn't cut before falling back out of the screen.

false

spawn_bombs

Boolean

Option to display bad items in the game (must have bad items in the fruits array).

true

fruit_bounce

Boolean

Option to make items bounce on left and right "walls" (if set to false, will leave the screen).

true

timer

Integer

Duration of the game (in seconds).

60

text_police

String

Font to be used in the game (Google Fonts).

"Arial"

overlay_width / _height

Integer

Size of the canvas.

600 / 600

default_lang

String

[PTF] Default language if unmatched language.

"fr"

score

String

Text in the header.

"Score"

remaining_lives

String

Text in the header.

"✕ ❤️"

time_left

String

Text in the header (displayed if no lives).

"Time remaining"

tutorial_text_1

String

Tutorial text for good items.

"Cut fruit to score points."

tutorial_text_2

String

Tutorial text for bad items.

"Each bomb you cut costs you one life."

Assets

Key
Size
Explanation
Default
img_whole_src
img_Left_src
img_Right_src
img_Stain_src

64 x 64px (whole / left and right must be of the same size) 100 x 100px (stain)

Visuals of an item.

background_image

500 x 500px

Background of the game.

tutorial_background_image

500 x 500px

Background of the tutorial.

gameover_image

500 x 500px

Image displayed at the end of the game.

newgame_circle_image

500 x 500px

Visual to put behind/around the tutorial items.

Last updated