For the complete documentation index, see llms.txt. This page is also available as Markdown.

Snake

Configuration

JSON
{
  "options": {
    "header_background_color": "black",
    "header_text_color": "white",
    "number_case": 8,
    "spawn": {
      "x": 4,
      "y": 7
    },
    "case_per_second": 1.25,
    "max_case_per_second": 5,
    "acceleration_percent": 10,
    "direction": {
      "url": GAME_URL + "/arrow.png"
    },
    "snake": {
      "direction": "N",
      "url": GAME_URL + "/snake.png"
    },
    "apple": {
      "url": GAME_URL + "/apple.png"
    },
    "background": {
      "url": GAME_URL + "/background.png"
    },
    "tuto": {
      "mobile": GAME_URL + "/tutorial_mobile.gif",
      "desktop": GAME_URL + "/tutorial_desktop.gif"
    }
  },
  "texts": {
    "en": {
      "score": "Score",
      "unit": "Apple(s)"
    },
    "fr": {
      "score": "Score ",
      "unit": "Pomme(s)"
    },
    "nl": {
      "score": "Score",
      "unit": "Appel(s)"
    }
  },
  "images": {
    "rewards": {}
  }
}

Options

Key
Type
Explanation
Default

String

Colour / background of the header.

"black" / "white"

Integer

Number of cells in a row / column (total cells will be number_cases² as the game is always a square).

8

Integer

Indexes of the start cell.

4 / 7

Integer

Base speed.

1.25

Integer

Max speed.

5

Integer

Acceleration (between 0 and 100).

10

String

Starting direction (could be N, S, E, W).

"N"

String

Text in the header.

"Score"

String

Text in the header.

"Apple(s)"

Assets

Key
Size
Explanation
Default

200 x 200px

Arrows (helper) to be displayed on touch screens.

(100*sprite) x 100px

Visual of the snake (is a sprite of the snake parts!!).

100 x 100px

Visual of the item to retrieve.

500 x 500px

Background visual.

500 x 500px

Tutorial visual (can be animated, or not).

Last updated