# Simple Integration

{% hint style="info" %}
**Creator's Notes:** Simple Integration is quite..."SIMPLE"! All you need to do, is to make a game or interactive scenario, that fits Enertime's usage [modes](/fundamentals/using-enertime/usage-basics.md#game-modes)!
{% endhint %}

Here, we will take a look at an easy tutorial of how YOU can MODIFY a game on scratch to comply with our game modes and make it easier for users to exercise while having fun!

### TUTORIAL: Flappy Bird on Scratch

#### Step 1 - Pick a game of your choosing on Scratch

* For the purpose of this demonstration, we will use the 2D scratch game that may be found [here](https://scratch.mit.edu/projects/567352805/editor/)!
* As the game is on scratch, we recommend registering for an account to explore the plethora of games available.
* Scratch is a useful tool as it will allow you to modify the game to better suit our gesture-based interaction modes.

#### Step 2 - Game Modifications

1. **Changing play-style for flappy bird**
   * KEYBINDS: Jump action -> pressing spacebar key \[to make the bird jump]
   * ORIGINALLY: The game would end if the bird hit the pillars or touched the ground

     <figure><img src="/files/1LjhTJSMqwT7z6R56Jv9" alt=""><figcaption><p>Classic Flappy Bird</p></figcaption></figure>
   * PROBLEM: But, it is impossible for a person to continuously jump to keep the bird alive.
   * SOLUTION: Modify the game to make it more realistic for human capabilities, i.e.,  levitate the bird slightly above the ground to ensure it will never touch it.&#x20;

     <figure><img src="/files/LDvNDYanhXXDPbPB1C7Y" alt="" width="450"><figcaption><p>Levitating Bird Sprite</p></figcaption></figure>
   * It can be done by placing the default y-coordinate of the bird sprite higher than the ground level (for our version, we placed y = -97).
   * Then, we compare the current height of the sprite with this default value, to ensure that it never falls below this limit.
   * In this way, we can ensure that the sprite is always levitating slightly above ground and will not die if we don't jump.

2. **Changes to the obstacles**

   * ORIGINALLY: There were some wider obstacles that would require the bird to jump twice in a short period of time.
   * PROBLEM: It is difficult for players to continuously jump to ensure that the bird safely flies across the obstacles due to the varying thickness of the obstacles.

   <figure><img src="/files/jCJIgZGHXQ4zeAMWyyf3" alt="" width="375"><figcaption><p>Obstacle bar is too wide for the bird to cross in a single jump</p></figcaption></figure>

   * SOLUTION: Reduce the thickness of the bars, while increasing the gap between two bars, allowing users to seamlessly jump through the bars, as long as they time it properly.

   <figure><img src="/files/LDvNDYanhXXDPbPB1C7Y" alt="" width="300"><figcaption><p>Decreasing the width of the obstacles</p></figcaption></figure>

   * This can be done by going to the costumes section in scratch and editing the obstacles to your desired height and thickness.

3. **Placing a buffer timer so that players can get ready**

   * Placing a 5 second buffer timer so that players may get ready and familiarize themselves with the controls.

   <figure><img src="/files/5dTURhxNhAHy0OB0Twcq" alt="" width="375"><figcaption><p>Placing buffer time for players to get ready</p></figcaption></figure>

   * It can easily be done by using a "wait until" command before the initialization of the obstacles once the start flag is clicked.

These steps will allow you to integrate your game ideas with ours and how they may be modified to seamlessly integrate with Enertime.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.enertime.io/use-cases/for-developers/simple-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
