Thoughts on teaching programming with Minecraft and Python

Saturday saw the first dBsCode taster workshop, for budding programmers between 11 and 16. We set up 20 Raspberry Pi’s, which we networked together and used our new procedural Minecraft 3D shape primitives to build a number of projects in Python involving castles, spiders and an infinite house generator.



Networking was very important – it enabled them to jump into each other’s games which started as a major distraction, but ended up being useful – as people could see what each other were doing and work together.

As part of this, some level of ‘griefing’ was present (where other players interfere in your world), but asking them about this during the breaks, the consensus was that this is part of the culture of Minecraft – I even instructed victims to pull their network cables out, but they saw that as completely unnecessary. Most of them took turns in both constructive/collaborative and programming activity and destructive/graffiti like activities associated with griefing, and this was acceptable to them. The use of code to easily rebuild structure after damage (or being able to remove people with liberal procedural application of lava) was therefore quite an attractive feature of the code approach.

It was common to adapt the programming to fit their understanding of Minecraft, so it seemed natural to take on a hybrid approach to building – using Python to do the heavy lifting (building, or extracting large areas) or repetitive tasks, after which they did the fiddly or more creative bits manually as normal. For example one student used the sphere primitive to extract huge caves underground, and then filled them with little hand made shrines and sculptures.

What was interesting was that to some extent the ‘experts’ at Minecraft (many of whom already document their creations on Youtube channels) found this more challenging in many ways than those less attached to the Minecraft culture – who were more accepting of new ways of doing things.

The manner of programming we used here – running Geany (a lightweight Python IDE) at the same time as Minecraft, was completely in line with livecoding practice, as programs interacted with the Minecraft world in realtime with network messages. The great thing about the rather slow network bottleneck is that you can walk around a structure while the program is creating it, which allows a much better understanding of how the process is working than if it instantly popped into existence.

5 thoughts on “Thoughts on teaching programming with Minecraft and Python

  1. Hey. Great article. Very inspiring. Although this sounds like one of those wordpress spam, it’s not. ;) I’m amazed by the ‘unexpected’ behaviors you encountered and how they were solved. Again, inspiring. Makes me want to grab a Pi.

  2. “or being able to remove people with liberal procedural application of lava”…haha!

    Thanks for writing about this. I love that you were able to step back, talk to them, and listen to what was working rather than assuming thinks like “griefing” were always bad (as I think I would have done).

  3. Thanks – yep that was quite a learning experience. This year we were a bit more ready for it – and also unplugging seemed more important this time, not because the griefing was particularly bad, but because it gave them a level of understanding of networking physicality – wires! :)

Leave a Reply

Your email address will not be published. Required fields are marked *