Skip to main content
Calculating with Code

Target Points

Challenge: In this game, the VR Robot starts each drive at the red Start Position in the center of the board with a starting score of 1000 points. The object of the game is to drive the robot to draw lines that hit the targets on the game board to score more points. Each time the robot arrives at a target, the starting score is updated based on the arithmetic operation along the pathway(please see the Game Board image). The robot also receives a bonus score based on its position on the target. The closer to the center of the target, the more points the robot gets! The highest score wins!

Bonus scores are as follows:

The robot arrives at the Outer ring: 200 points

The robot arrives at the Middle ring: 5000 points

The robot arrives at the Inner ring:10000 points

  • Choose and download the Target Points Game Board as a PNG file from this Google slideshow.
  • Select the Art Canvas+ Playground and upload the Target Points Game Board.
  • Code the VR Robot to draw a line with the VR pen that hits as close as possible to the center of each target. One try is allowed per target.
  • Use the Operator blocks to calculate the updated score points for each target based on the arithmetic operation along the pathway. 
  • Use the [print] block to print the calculated score values to the Print Console.
  • Play the Target Points Game with a friend. The highest score wins!

Helpful Hints

  • Use the move  block from the Looks category to set the position of the VEX VR Pen.

    Move Pen Down Block

    • Matching Python command:

      Move Pen Down Python

  • Each square in the Target Points Game Board measures 200mm by 200mm.
  • Use the add block from the Operators category to add two values together and report the sum.

    Add Block

    • Matching Python command:

      Add Python

  • Use the subtract block from the Operators category to subtract one value from another and report the difference.

    Subtract Block

    • Matching Python command:

      Subtrack Python

  • Use the multiply block from the Operators category to multiply two values together and report the product.

    Multiply Block

    • Matching Python command:

      Multiply Python

  • Use the print block from the Look category to print the values to the Print Console.

    Print Block

    • Matching Python command:

      Print Python