Using Hula-Hoop Game in MakeCode Arcade

Game Strategy

Like real-world Hula Hoop, the goal is to keep the hoops moving. If all hoops stop, you lose with score zero.

Winning requires keeping the hoops moving through four levels, which are indicated by the hearts on the left of the screen: the more hearts the longest lived. The level advances when the current countdown reaches zero.

The first level requires keeping the hoops moving for 10 seconds. Each level adds 10 more seconds until the 4th and last level of 40 seconds makes a total for all levels of 100 seconds to win. If the player completes the 4th level, the score is the number of hoops moving at the end of the 4th countdown.

Each level ls increasingly difficult. With each new level, not only is the countdown time longer; but, each new hoop is launched at a slower velocity making it more likely to stop. Additionally, with each advancing level, when two hoops overlap one is more likely to follow the other, which also makes the hoops more likely to reach an equilibrium that stops all hoop movement.

Up/Down Buttons Add/Remove Hoops

The up button adds one hoop. When a hoop is added, the current countdown starts over. Hoops are launched at a random position with a random velocity.

The down arrow removes the slowest hoop, for example, a hoop that has stopped moving altogether. The countdown does not restart.

Code for Hula Hoop

Our next post will be a description of the code for the Hula-Hoop game.

Code Overview

The main Hula Hoop blocks show below are typical of an action game.

The main blocks are:

  • On start initializes the program.
  • On game update keeps things going.
  • On countdown end advances a level or, if at level 4, ends the game.
  • Up/down buttons add/remove a hoop.
  • On overlap hoops, depending on the stickiness, makes one hoop follow the other and change the colors of the two hoops.

To Play Hula Hoop and Get the Code Click the Link Below

https://makecode.com/_fViaJ0hxbfd5