News and Blog

EPSRC CDT in Next Generation Computational Modelling

Winchester Science Centre - Minecraft with Python

Children playing Minecraft and editing Python scripts

Alvaro , Ashley and Matt teaching some children how to have fun with coding in Minecraft

Using a modification package written for the popular children's game Minecraft by Alvaro Perez-Diaz called pytool, several students from the CDT ran an event at the Winchester Science Centre where they introduced programming to young children via the popular game.

The package allows users to write python code and then easily run their code inside of the game immediately by right-clicking an item corresponding to the script. These do things such as build structures, fire projectiles or even create interactive games. The idea behind this package is that it will allow children and students to engage with programming in a way that they can understand and that allows them to see changes physical changes in their Minecraft worlds rather than via text and numbers in a terminal.

The event was structured such that some simple scripts were provided that created things such as words made out of blocks, a house and a projectile that exploded when it hit something. The children could change the text that was built by changing a string in the code and could change the colour of the blocks that made the word. They could change the dimensions of the house by replacing the numbers specifying height and length in the script and change the speed of the projectile and the gravity pulling upon it to be as strong as that on various planets.

Children playing Minecraft and editing Python scripts

Alvaro , Ashley and Matt instructing some children how edit python scripts to change the behaviour of the script items inside of minecraft

We found that the children engaged well with the tasks and even young children understood the link between what they could read in the code and what happened in the game world when they used the scripts. Several exclaimed their excitement at being able to program something that they could then run in a game they enjoyed playing recreationally in their spare time. Many wanted to have the opportunity to play with this tool again at future events or at home, and some wanted to have the opportunity to learn programming in this kind of way at school.

The package and installation instructions are available here and parents and guardians were provided with a leaflet explaining what the package was, where to install it and how to contact the CDT and author of the package.

Comments