Interactive Obstacle Course Tracker

💭 Think About...

1. What are some real-world examples of obstacle courses or mazes? How do people navigate through them?
2. How could we use coding to help guide someone through an obstacle course? What information would the program need?
3. What different ways can a computer program take in information from the real world?
4. If you were doing an obstacle course, what senses would you use to know where you are and where to go next?
5. How do you think coding an obstacle course tracker is similar to or different from programming a robot to navigate a maze?

🔨 Your Project

  1. Design your obstacle course on paper using the "Obstacle Course Map." Draw the path and add symbols for each obstacle.
  2. Open the coding platform and start a new project.
  3. Use the "Obstacle Course Tracker Code Blocks" reference to find the code blocks you'll need.
  4. Create variables to keep track of the user's position on the course. You'll need an x and y variable.
  5. Set up your background to show your obstacle course map.
  6. Add a sprite (character) to represent the user on the map. Place it at the start position.
  7. Create a loop that will run until the sprite reaches the end of the course.
  8. Inside the loop, use conditionals to check if the sprite is touching an obstacle. If so, have it say what the obstacle is.
  9. Use motion blocks to move the sprite along the path based on the user's position variables.
  10. Add user input blocks to let the user control which direction the sprite moves.
  11. At the end of the course, have the sprite say a congratulations message.
  12. Test your program and debug any issues. Make sure the sprite follows the path correctly and identifies obstacles.
  13. When you're done, share your project with the class and explain how your code works.
  14. Finally, take turns running the real obstacle course, using your program to guide you!