Game Development Reference
Perform the following steps to iniialize the game:
Start with a when I receive <game_start> block. The game_start message is
broadcasted when the Start buton is pressed.
Enter 0 in the set <curr_scroll_amount> to () block.
Then, enable hide .
Enable the play sound <level_start> block.
Then, broadcast the broadcast <level_start> message block.
Enter 2 in the wait () secs block. This is to give the player a chance to take a breather
before the fast-scrolling acion.
Next, broadcast the broadcast <start_scrolling> block. The brick and food sprites
will respond by staring to scroll.
To win the game, Marco or Polo has to inish the run without eaing bad food. When the last
frame has been reached, the brick sprite would send out the scroll_max_reached message.
To handle the scroll_max_reached message, perform the following steps:
Start with a when I receive <scroll_max_reached> block.
Enable the switch costume to <You Won> block.
Enter 24 and -24 in the go to x: () y: () respecively.
Then, enable show .
Next, broadcast the broadcast <game_won> block.
Enable the play sound <triumph> unil done block.