Skip to main content

Lesson 4: Dynamic Castle Crasher Challenge

In the Dynamic Castle Crasher Challenge, the VR Robot must now knock ALL pieces off of each iteration of the Dynamic Castle Crasher Playground, in the quickest way possible!

Empty playground

Learning Outcome

  • Apply logic of repeated decisions with multiple sensors to solve the Dynamic Castle Crasher Challenge.

Putting It All Together

Algorithms enable a user to create more diverse and efficient projects. Algorithms are precise sequences of instructions that can use selection and iteration to instruct the VR Robot to use information from its environment to execute behaviors.

Screen Shot 2020-06-10 at 2.51.48 PM

Algorithms use loops to continually check sensor values, and repeat behaviors. Nesting conditional statements inside loops such as [Forever] or [Repeat until] blocks will instruct the VR Robot to continually check those conditions.

Algorithm example

Selection is employed by using conditional statements such as [If then else] or [Repeat until] blocks to instruct the VR Robot to execute certain behaviors, depending on reported conditions, such as sensor values.

Selection is employed by using conditional statements.

Using sensors with loops and selection enables the VR Robot to interact with a changing environment, such as the Dynamic Castle Crasher Playground.

dynamic castle crasher playground

Dynamic Castle Crasher Challenge

In this challenge, create a project where the VR Robot uses an algorithm to knock all of the building pieces off of the Dynamic Castle Crasher Playground, in the shortest amount of time possible.

Solving the Dynamic Castle Crasher Challenge requires the use of a timer. You can use a stopwatch, a phone, or you can even use the timer on the VR Robot.

For Your Information

You can use the monitor feature in VEXcode VR, and select the (Timer value) block to be monitored. Every time the project is run, the monitor resets.

using monitor

For more information on using the Monitor Console, view the Variable and Sensing Values Monitoring - Tutorials - VR Blocks article.

Follow these steps to complete the challenge:

  • Create a new project or load a project from previous Lessons in this Unit.
  • Rename the project Unit9Challenge.
  • Launch the Playground window.
  • Load the Dynamic Castle Crasher Playground.
  • Add the blocks necessary to drive the VR Robot to push all of the building pieces off of the Dynamic Castle Crasher Playground in the shortest amount of time. The VR Robot should not fall off of the Playground.
  • Start the project to test if it works. The algorithm should work regardless of the layout of the Playground.
  • Document the time it took to complete the challenge on a piece of paper, on your device, or by monitoring the timer in VEXcode VR.
  • Continue to revise and run the project until the VR Robot successfully completes the Dynamic Castle Crasher Challenge in the shortest time.
  • Save the project once the VR Robot successfully knocks all of the building pieces off of the Dynamic Castle Crasher Playground in record time.

Congratulations! You have successfully completed the Dynamic Castle Crasher Challenge!

Questions

Please select the link below to access the lesson quiz.

Open Lesson Quiz   >