> For the complete documentation index, see [llms.txt](https://doc.lucky-cycle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.lucky-cycle.com/games/index/paper-toss.md).

# Paper Toss

{% hint style="warning" %}
Demo: <https://campaigns.lucky-cycle.com/utils/games?game=paper-toss>
{% endhint %}

1. [#configuration](#configuration "mention")
2. [#options](#options "mention")
3. [#assets](#assets "mention")

### Configuration

<details>

<summary>JSON</summary>

```json
{
  "options": {
    "visible_hitbox": false,
    "number_of_shoot": 5,
    "time_between_shoot": 1000,
    "background": {
      "url": GAME_URL + "/background.png",
      "height": 600,
      "width": 900
    },
    "ball": {
      "url": GAME_URL + "/paper.png",
      "height": 50,
      "width": 50,
      "speed": 9
    },
    "keeper": {
      "active": false,
      "url": "",
      "height": 1,
      "width": 1,
      "offsetY": 0,
      "speed": {
        "min": 1,
        "max": 1
      }
    },
    "goal": {
      "url": GAME_URL + "/bin_back.png",
      "url_foreground": GAME_URL + "/bin_front.png",
      "height": 145,
      "width": 113,
      "offsetY": 50,
      "paddingX": 10,
      "floorLine": 100,
      "scoreLine": 0,
      "scoreLineOffsetY": -75
    },
    "board": {
      "url": GAME_URL + "/board.png"
    }
  },
  "texts": {
    "en": {
      "shoot": "Throws: ",
      "score": "Points: "
    },
    "fr": {
      "shoot": "Lancers : ",
      "score": "Points : "
    },
    "nl": {
      "shoot": "Gooien: ",
      "score": "Punten: "
    }
  },
  "sounds": {},
  "images": {
    "rewards": {}
  }
}
```

</details>

### Options

<table><thead><tr><th>Key</th><th>Type</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>visible_hitbox
</code></pre></td><td>Boolean</td><td><mark style="color:purple;">[DEV]</mark> Display the hitboxes.</td><td>false</td></tr><tr><td><pre><code>number_of_shoot
</code></pre></td><td>Integer</td><td>Number of times a player can "shoot" the ball.</td><td>5</td></tr><tr><td><pre><code>time_between_shoot
</code></pre></td><td>Integer</td><td>Delay between each "shoot".</td><td>1000</td></tr><tr><td><pre><code>background > height / width
</code></pre></td><td>Integer</td><td>Background's visual sizes.</td><td>600 / 900</td></tr><tr><td><pre><code>ball > height / width
</code></pre></td><td>Integer</td><td>Ball's visual sizes (to render).</td><td>50 / 50</td></tr><tr><td><pre><code>ball > speed
</code></pre></td><td>Integer</td><td>Speed of the ball.</td><td>9</td></tr><tr><td><pre><code>keeper > active
</code></pre></td><td>Boolean</td><td><mark style="color:purple;">[Do not edit]</mark> Set to true to enable the keeper <mark style="color:yellow;">(used in </mark><em><mark style="color:yellow;">penalty</mark></em><mark style="color:yellow;">)</mark>.</td><td>false</td></tr><tr><td><pre><code>keeper > height / width
</code></pre></td><td>Integer</td><td>Keeper's visual sizes (to render) <mark style="color:yellow;">(used in </mark><em><mark style="color:yellow;">penalty</mark></em><mark style="color:yellow;">)</mark>.</td><td>1 / 1</td></tr><tr><td><pre><code>keeper > offsetY
</code></pre></td><td>Integer</td><td>Vertical adjustment of the keeper <mark style="color:yellow;">(used in </mark><em><mark style="color:yellow;">penalty</mark></em><mark style="color:yellow;">)</mark>.</td><td>0</td></tr><tr><td><pre><code>keeper > speed > min / max
</code></pre></td><td>Integer</td><td>Speed of the keeper (is random between <em>min</em> and <em>max</em> at each "shoot") <mark style="color:yellow;">(used in </mark><em><mark style="color:yellow;">penalty</mark></em><mark style="color:yellow;">)</mark>.</td><td>1 / 1</td></tr><tr><td><pre><code>goal > height / width
</code></pre></td><td>Integer</td><td>Goal's visual sizes (to render).</td><td>145 / 113</td></tr><tr><td><pre><code>goal > offsetY
</code></pre></td><td>Integer</td><td>Vertical adjustment of the goal.</td><td>50</td></tr><tr><td><pre><code>goal > paddingX
</code></pre></td><td>Integer</td><td>Horizontal padding for the goal. (the ball will <strong>bounce</strong> of those areas).</td><td>10</td></tr><tr><td><pre><code>goal > floorLine
</code></pre></td><td>Integer</td><td>Ground level (if no goal).</td><td>100</td></tr><tr><td><pre><code>goal > scoreLine
</code></pre></td><td>Integer</td><td>Score level (if goal).</td><td>0</td></tr><tr><td><pre><code>goal > scoreLineOffsetY
</code></pre></td><td>Integer</td><td><em>Height to reach to score a point.</em></td><td>-75</td></tr><tr><td><pre><code>shoot
</code></pre></td><td>String</td><td>Text displayed in the header.</td><td>"Throws: "</td></tr><tr><td><pre><code>score
</code></pre></td><td>String</td><td>Text displayed in the header.</td><td>"Points: "</td></tr></tbody></table>

### Assets

<table><thead><tr><th>Key</th><th>Size</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>background > url
</code></pre></td><td>~600 x 600px <mark style="color:yellow;">(adapt </mark><em><mark style="color:yellow;">background</mark></em><mark style="color:yellow;"> sizes)</mark></td><td>Background of the game.</td><td><a href="https://statics.lucky-cycle.com/files/_games/paper-toss/background.png">/background.png</a></td></tr><tr><td><pre><code>ball > url
</code></pre></td><td>50 x 50px</td><td>Visual of the ball.</td><td><a href="https://statics.lucky-cycle.com/files/_games/paper-toss/paper.png">/paper.png</a></td></tr><tr><td><pre><code>keeper > url
</code></pre></td><td>/</td><td>Visual of the keeper <mark style="color:yellow;">(used in </mark><em><mark style="color:yellow;">penalty</mark></em><mark style="color:yellow;">)</mark>.</td><td>/</td></tr><tr><td><pre><code>goal > url
</code></pre></td><td>~100 x 150px <mark style="color:yellow;">(adapt </mark><em><mark style="color:yellow;">goal</mark></em><mark style="color:yellow;"> sizes)</mark></td><td>Visual of the bin (back).</td><td><a href="https://statics.lucky-cycle.com/files/_games/paper-toss/bin_back.png">/bin_back.png</a></td></tr><tr><td><pre><code>goal > url_foreground
</code></pre></td><td>~100 x 150px <mark style="color:yellow;">(adapt </mark><em><mark style="color:yellow;">goal</mark></em><mark style="color:yellow;"> sizes)</mark></td><td>Visual of the bin (front).</td><td><a href="https://statics.lucky-cycle.com/files/_games/paper-toss/bin_front.png">/bin_front.png</a></td></tr><tr><td><pre><code>board > url
</code></pre></td><td>~400 x 200px</td><td>Visual of the scoreboard.</td><td><a href="https://statics.lucky-cycle.com/files/_games/paper-toss/board.png">/board.png</a></td></tr></tbody></table>
