8-10 yrs old
11-13 yrs old
Using code for real time positional sensing of the player. The map was created by Faith Shupee, who kindly agreed to let me use it for this lesson.
January 25, 2019
Adventures in Minecraft, Martin O'Hanlon & David Whale
Chapter 2 of this book deals with positional sensing (albeit using Python) in Minecraft. Much of this material was the inspiration behind this lesson.
Magical Castle World (.mcworld)
Slightly modified version of the CompaCastle map created by Faith Shupee (@FaithShupee), who kindly agreed to allow me to use it for this lesson.
Example Solution using Makecode (Code Builder)
This code uses the Makecode editor to perform all of the assignments.
Real time sensing of the players position is a fundamental concept behind this lesson.
Do we need to calculate the y co-ordinate?
Conditional event triggering raises some interesting considerations.
How could we modify the 'if' statements to instead sense if the player is within a region (e.g. a room)?
Sequencing of events can cause unintended consequences.
Why might it not be a good idea to spawn mobs 'continually' when a player is at a certain location (clue: you may find that Minecraft crashes!)? If waits/pauses are used, what considerations could be used to determine how long to wait for?
Events are largely limited by the student's imagination.
What sort of experience do you want to create for players?
Students should have a good knowledge of how co-ordinates are used to both sense a player in real time, and trigger events based on the players location.
Students should also gain an appreciation for sequencing events, in particular the need to add delays when spawning mobs.
Significant creative scope is possible for students to experiment with different behaviours. Here an emphasis can be placed on user experience, and students should be encouraged to consider how they are designing the users experience in the castle.
Sign up for the Minecraft: Education Edition newsletter. We promise to respect your inbox.