Trying it out - Escape the Maze: My First Interactive Game

Objective

After completing this lesson, you will be able to apply the concepts of the previous lesson - Escape the Maze: My First Interactive Game.

Exercise

Your Turn!

Now it’s your turn. Download this document for a recap of the blocks we covered in this lesson and some hands-on exercises for you to explore.

What You Have Learned in This Lesson

Interaction between sprites

In this lesson, you learned how to let different sprites interact with each other. You can let sprites communicate via the broadcast block. The broadcast block sends the selected message to all sprites or a specific sprite in the project. If those sprite(s) have one or more When I receive (message) hat blocks with the corresponding message, they will react accordingly.

You can create a new message by clicking on the input slot of the broadcast or When I receive block and select "new…" or pick one of the existing messages of your project from the same dropdown menu.

You can send messages across different sprites using the broadcast block. All hat blocks that react when they receive the corresponding message, are triggered and run in parallel.

Additionally, you learned how to check for "physical" sprite interaction with the touching predicate. In the dropdown menu of that block, you can select other sprites in the project (or the mouse pointer, pen trails or stage edges).

The block then reports "true", when the currently selected sprite is touching the sprite indicated in the input slot and "false" otherwise.

The touching predicate reports either true or false, based on whether the selected sprite is currently touched (or pen trails, mouse pointer or edge).

Adding costumes

Besides drawing costumes with the Paint Editor and taking pictures with the webcam, you learned another way to dress a sprite up with costumes – the media library.

You can access the media library from the file menu – "Costumes…".

In the Costumes browser, you can click on a costume to select it and then on the "Import" button to load it. Some costumes have several versions of the same motive and can be used to animate the sprite.

Load all the costumes you need for your sprite and then click the "Cancel" button to close the media library.

The media library with a selection of costumes can be accessed from the file menu – “Costumes…”. To add a costume to the current sprite, click on the image file in the costumes browser and press the “Import” button. Press “Cancel” to close the media library.

Sprite settings

Finally, you learned more about the settings of your sprite. In the sprite settings area, you can define the rotation style of your sprite (1) to let it rotate in all directions, make it only look left/right or don’t rotate at all.

You can see its current costume (2), give it a name (3), or decide, whether it’s draggable (4) or can only be moved programmatically.

Sprite settings area.