Programming in Minecraft with Python

Programming in Minecraft with Python

Earlier this year, I decided I would like to run workshops for kids. I set the date and started looking for people who could help. Firstly, I needed programmers who would be willing to invest their free time to work on the exercises and run the workshops with me. Surprisingly enough, no one ever said no; doing something for kids opened every possible door. We got into the routine of meeting every Tuesday, early morning before work, to do some Python exercises and learn more about Minecraft.

Last week, we delivered our very first Codecraft workshops for kids and teenagers. It was a blast and the kids were just great! Parents were ok (biggest fears here)! We were ok, maybe a few things that we needed to fix, no collateral damage to the kids though!

A few facts: 

  • we had 20 kids (and a waiting queue),
  • we had 5 mentors and 5 groups,
  • we grouped children by age,
  • workshops were 6h long,
  • workshops were free,
  • we had one sponsor – Hubraum.

Also, I just want to share a few thoughts:

We did the workshops using Minecraft and Python. The choice here isn't accidental, the combination of both is incredible, super powerful. There are several reasons for this:

  • Kids know Minecraft very well. They all love it. All of the participants already spend many hours in that game. They know the game better than us.
  • Code execution within the Minecraft world is very visual. Only 3 lines of code are needed to set a block in the Minecraft world. No terminal, no caring about packages (check the video).
  • Minecraft, by design, operates in discrete space so no float operations - just integers. To our surprise, most of the children were operating with ease in 3-dimensional space.

One problem, but not really with Minecraft; you have to go a long way to actually enable Python integration with Minecraft. You have to download third-party mods (Forge, raspberryjammod). This takes some time and we had to do it 1:1 with every participant. I'm aware that Microsoft has Minecraft for education but from my assessment, it’s an extra product so, it's not very compatible with our idea. And children can’t use it with their own Minecraft copies.

We used Python 3. I think Python is one of the best languages for education purposes. And it’s a very good language in general. However, as a language by design it’s very flexible and doesn't offer much static analysis. You need to spend some time to set up your own linting. We could do a better job here. Kids will make all sorts of mistakes, typos, missing commas, wrong arguments. For most of them, error messages are magic. Also, error messages are in English only, whereas the workshops were in Polish. We could set up their editors better and give them the chance to fix errors when the line is red, not when scary error messages pop up.

The computers kids bring can also be a mess. Not sure where the problem really is when a laptop with i7 processor will barely run an operating system, Minecraft will run in very few FPS, and the default browser will have malware in it. In organizational emails to parents, I tried to strongly emphasise that laptops should be in decent shape. They shouldn’t have any viruses and all Windows updates should be done. The thing we really wanted to avoid spending time on is having to set up kids’ laptops. I guess my definition of decent shape is very far from an average decent shape. To be honest, we’re not really sure if we can fix it. And this is what worries me the most before the next workshops.

We grouped the children by age. This worked to some degree, but in some cases, this measure failed for obvious reasons. Desynchronization of group progress is dangerous. Kids mostly have a very short attention span. So while one kid is dragging or rushing, the rest of the group will go sideways. I even saw one kid trying to launch Fortnight. Although progressing swiftly to those exercises requiring more time to accomplish helped a lot.

The best moment from this workshop for me? When the parents came back and their kids, full of all the excitement, started to show them few-thousand-long tunnels made with blocks, really long stairs or other constructs built only with TNT blocks, just to be blown away in the very next second.

We really did do a good a thing there.

This happened thanks to all those lovely people: Michał Białas, Michał Rączka, Piotr Czachur, Łukasz Kieda, Tomek Żądło who helped me with coding and running the workshop and Magdalena Sobolak, Vitalii Tsys, Andrzej Wieser, Łukasz Gaffling, Małgorzata Frytek, Kamil Paterek, Piotr Pawluś who helped put all the blocks together.

And Hub:raum Kraków for sponsoring the whole event.


To view or add a comment, sign in

Others also viewed

Explore content categories