O'Reilly logo

Scratch 2.0 Game Development HOTSHOT by Sergio van Pul, Jessica Chiang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding scripts to the Game Manager sprite

In Project 4, Space Age, we introduced the practice of adding a Game Manager sprite to handle the game initiation and termination, level up, as well as scoring. Keep the game logic in a centralized location such as Game Manager, which makes it easier to configure and update the game. The Hunger Run starter project also includes a Game Manager sprite.

Prepare for lift off

Verify that the Game Manager has costumes named Starter Screen and Level One.

Prepare for lift off

Engage thrusters

We will create the code to initialize the game and determine the game completion or termination.

Perform the following steps to initialize the system: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required