Enertime
  • 🐣Enertime
  • Overview
    • 💡What we do
    • ✨Our Features
  • Fundamentals
    • 🛠️Installing Enertime
    • 🤾Using Enertime
      • 📝Usage Basics
      • 🧑Playing a Game!
  • Use Cases
    • 🖥️For Developers
      • 🤖Simple Integration
      • 👾Advanced Integration
        • Custom Protocol Sheet
  • Afterward
    • 🌱Future Development
Powered by GitBook
On this page
  1. Use Cases
  2. For Developers

Simple Integration

PreviousFor DevelopersNextAdvanced Integration

Last updated 1 year ago

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 !

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 !

  • 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

    • 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.

    • 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.

    • 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.

    • 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.

    • 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.

🖥️
🤖
here
Classic Flappy Bird
Levitating Bird Sprite
Obstacle bar is too wide for the bird to cross in a single jump
Decreasing the width of the obstacles
Placing buffer time for players to get ready
modes