Hunting Sprites in Scratch
Michael Badger
This article draws inspiration from the popular Pokémon Go app to recreate a sprite hunting game in Scratch. The project explores synchronization and randomness as the player explores various backdrops in search of sprites.
In my sprite hunting game, I want to create the basic premise of capturing a random sprite based on the idea that a player walks to public places to locate and capture the sprites. In this case, I'll use a sprite to walk the Scratch stage and backgrounds to represent the destinations. The sprite will show up randomly based on how long the player walks. The player will have a limited number of attempts to capture the sprite before it escapes.
One way to bring additional realism into the game is to physically walk through your nearest town and take some pictures of churches, government buildings (e.g., post office), local businesses, and parks. These are the common places sprite players find themselves while playing the game. Those photos can be imported to Scratch as backgrounds and serve as scenery for your battles (Figure 1).
This game relies heavily on synchronized scene changes; the best way to handle synchronization in Scratch is by using broadcasts, which you can send with the broadcast()
block. When this block runs, it sends the specified message to all sprites and the stage. When you want a sprite or the stage to respond to a broadcast message, you use a when I receive()
block to listen for the broadcast message, and then run a script when the block is triggered.
[...]
Use Express-Checkout link below to read the full article (PDF).