Scratch programming – Maze

$5.00


Warning: Undefined variable $cart_contains_subscription in /srv/users/brainstemuniversity/apps/brainstemuniversity/public/wp-content/plugins/woocommerce-payments/includes/class-wc-payments.php on line 1887

Theme

A maze game involves players navigating through a labyrinth in search of a taco truck. Players are unable to pass through the maze walls. Upon reaching the taco truck, the words “yummy time” will be displayed.

Content

  • Control – If and If-Else: Using conditional statements for decision-making.
  • Sensing – Touching Color: Detecting color collisions using the “touching color” block.
  • Import Image File for Background: Importing an image file to use as the game’s background.

 

Category:

Description

Theme

A maze game involves players navigating through a labyrinth in search of a taco truck. Players are unable to pass through the maze walls. Upon reaching the taco truck, the words “yummy time” will be displayed.

Content

  • Control – If and If-Else: Using conditional statements for decision-making.
  • Sensing – Touching Color: Detecting color collisions using the “touching color” block.
  • Import Image File for Background: Importing an image file to use as the game’s background.

 

Module 8: If & If-else

Lesson 18: Maze Game

Objective: Teach students how to create a Maze Game using control and sensing blocks in Scratch. Introduce importing image files for backgrounds.

Introduction:

  • Introduce the “Maze Game” concept: Players navigate a maze to reach a taco truck while avoiding walls.

Content:

1. Control – If and If-Else:

  • Explain conditional statements using “if” and “if else” blocks.
  • Teach how to use them for decision-making in the game.

2. Sensing – Touching Color:

  • Introduce the “touching color” block for detecting color collisions.
  • Explain how to use it to detect walls and boundaries.

3. Import Image File for Background:

  • Discuss the importance of background visuals in games.
  • Teach how to import an image file as the maze background.

Scratch Commands Covered:

  • Control – If and If-Else: Using conditional statements for decision-making.
  • Sensing – Touching Color: Detecting color collisions using the “touching color” block.
  • Import Image File for Background: Importing an image file to use as the game’s background.

Activities:

1. Introduction to Game:

  • Present the game concept, controls, and objective.
  • Explain that players must navigate the maze to reach the taco truck.

2. Maze Background Setup:

  • Discuss the importance of the maze’s visual representation.
  • Teach how to import an image file for the maze background.

3. Character Movement and Control:

  • Program the character’s movement using arrow keys or WASD.
  • Teach how to use the “change x by” and “change y by” blocks.

4. Wall Detection:

  • Use the “touching color” block to detect wall collisions.
  • Program the character to stop moving when it touches a wall.

5. Conditional Statements – If and If-Else:

  • Introduce “if” and “if else” blocks for decision-making.
  • Teach how to use them to check for win or lose conditions.

6. Reaching the Taco Truck:

  • Program the game to detect when the player reaches the taco truck.
  • Display the message “Yummy Time” upon reaching the truck.

7. Lose Condition – Touching Boundary:

  • Set up a lose condition using the boundary color detection.
  • Display a message when the player touches the boundary.

Conclusion:

  • Recap the concepts learned: control, sensing, conditional statements, and background visuals.
  • Encourage students to experiment with maze designs and game logic.
  • Discuss the importance of game aesthetics and user experience.

Assessment:

  • Assess understanding through questions during the lesson.
  • Evaluate student projects based on the functioning Maze Game.
  • Have students demonstrate their games and explain how they applied the concepts covered.

Allow students to spend time fine-tuning the maze’s difficulty and ensuring that the game’s win and lose conditions are balanced and engaging.