Creeper Tower Test

8-10 yrs old

Computer Science

Math & Economics


Use Code Builder and an agent to build two towers and test their creeper blast resistance.

avatar Submitted By: John Miller

January 25, 2019


  • Critical Thinking

Supporting Files

World File

World file for student use

Learning Objectives

  • Students will write a coding loop that will allow their agent to build two towers.
  • Students will plan and carry out an investigation to produce data and provide evidence to test a hypothesis. (NGSS 3-5-ETS1-3)

Guiding Ideas

Before beginning, students should be comfortable with controlling the movement of their agent and be familiar with the repeat loop. Click here to learn more about agent movement.

A loop allows coded statements to be repeated. Loops are useful as they encourage more succinct commands.

Minecraft blocks have specific characteristics that dictate their behavior in the game. Some are more blast resistant than others.

Student Activities

Working individually, or in pairs, students will test the structural strength of three different materials against a creeper blast. After observing the first, pre-built straw tower, students will program the agent to build one replica tower out of wooden planks and a third tower out of a block of their choice.

The red sandstone blocks on each platform will help center each tower.

Students should place a wooden plank block into their agent’s inventory before any construction begins. They will switch it out for a block of their choice to build the third tower.

Commands can be issued in shorter segments. For example, students may build one floor at a time. More proficient students should be encouraged to incorporate loop commands which will allow them to complete the tower in one segment.

They will likely need several agent commands such as:

  • teleport to player
  • place on move <true>
  • destroy obstacles <true>
  • turn [left, right]
  • move [forward, left, right, and up]

They will likely want to use a loop command as well:

  • repeat x times do, where x represents the height of the tower

Students needing a little help getting started may benefit from this tower building tutorial.

Once the towers are completed, it is time to test their resistance to a creeper blast. Students can invite classmates into their world and ask one to climb each tower.

Game conditions should then be set to Survival > Difficulty > Normal for the visiting players. The host can then spawn a creeper on top of each tower and after a short fight for survival, the creeper will explode.

Students should determine the number of blocks remaining on each tower and share their data with the class to determine a blast ranking for each type of block tested.

Performance Expectations

Students should be able to program their agent to build a solid tower, with a base of 4x4 wood planks, 5 stories tall.

Students should be able to copy and modify the program to allow their agent to build a third tower with the same dimensions using a block of their choice.

Students should collect data (the number of blocks remaining) after each creeper explosion.

Create a table to combine and present all results to the class.

Students should assign a ranking for each block tested.

Students should be able to answer the following questions:

  • What is a loop? How were loops useful in this task?
  • What was the most difficult coding challenge I had to overcome?
  • Were there challenges I could not overcome?
  • How did the block I chose compare to others in class?


  • Critical Thinking

External References

Supporting Files

World File

World file for student use