Let all your students write and test code on their desktop PCs that makes a 3d hollywood sign in minecraft running on a raspberry pi
Created by Pete Dring
last edited Mar 02 2014 by Pete Dring
This resource came from an activity at Manor CE Academy in York for the Hour of Code initiative. I’d heard of students being able to write python code on a raspberry pi that controlled a minecraft world and wanted a way that a whole class of students could get involved without having to get a whole class set of Raspberry Pis set up.
Raspberry Pis are the marmite of education technology at the moment - you either love them or hate them.
The positives: Students love using them to learn to code. They’re cheap, easy to fix if someone breaks something and they’re designed to be used in programming and robotics experiments
The negatives: You can’t get a whole class physically using pne raspberry pi and most ICT rooms are full of desktop PCs already so it seems silly to replace them with raspberry pis that are slower and less powerful.
This project includes a minecraft python API simulator which means that each student can write and test their python programs on their own desktop PC and then change one line of code so that it runs on a networked Raspberry Pi running minecraft.
This means you can set up one raspberry pi in your classroom running minecraft but each student in your class can write code & test it both locally on their machine and on the shared raspberry pi.
The idea is a competition where students work in teams to race to make a 3d hollywood sign saying ‘hour of code’ in the shared minecraft world.
Level: (Intermediate) Students don’t need any programming experience to do this. I’ve done this with a y7 class who’d never heard of python before. It does take a little bit of setting up for the teacher though - you need a raspberry pi connected to the same network as the student PCs running minecraft: http://pi.minecraft.net/
Duration: (1 hr) I usually start with the video (10mins) which explains what to do while I distribute student instruction sheets to all the desktop PCs. If students work in groups to help each other out, it usually takes around 45 mins before the first team completes the challenge of getting their ‘hour of code’ hollywood sign displayed on the raspberry pi.
Teaches: (set of concepts learned) - Introduction to programming in python - Sequences of instructions - Data representation (2d coordinates for images)
Disclaimer: The minecraft simulator that students use isn’t affiliated with the Raspberry Pi foundation or Mojang. It lets students create blocks and move the camera but it doesn’t simulate the whole python API. It also doesn’t display all the different types of blocks perfectly. I’m sure you’ll find things that are wrong with it - it’s only designed to be a quick bodge job that’s used for educational purposes - not a fully developed solution!
-Download the minecraft simulator here: https://github.com/pddring/mcpi-sim
-Download minecraft for the raspberry pi here: http://pi.minecraft.net/
-Watch the intro video here: http://youtu.be/-sUlfaN-vXA
-Read Craig Richardson’s blog on minecraft on pi here: http://arghbox.wordpress.com/2013/06/13/programming-minecraft-pi-with-python-early-draft/
-Download Craig’s minecraft API quick reference here: http://arghbox.files.wordpress.com/2013/06/table.pdf
-Read Craig’s student booklet on minecraft python coding here: http://arghbox.files.wordpress.com/2013/06/minecraftbook.pdf
-Read the teacher version here: http://arghbox.files.wordpress.com/2013/06/teacheredition.pdf