Learning to program with Minecraft
Gold Runner
To run the game, you will have to copy your file to the mcpi/api/python/
directory. Make sure Minecraft is running and then run your game with:
$ python treasureHunt.py
The first message (Move!) should appear on the screen, and the hunt is on!
Conclusion
The ability to program your Minecraft world using a simple Python API more than makes up for the lack of features in the Raspberry Pi version. Moreover, it's an entertaining way to help first-time programers, and kids especially, understand the use and usefulness of variables, loops, and functions, as well as to stimulate creativity and learn Python syntax.
Amazing projects are being created using the API, such as cannons [6], snake games [7], and more. As with Minecraft itself, the API is simple and straightforward, but by using the basic building blocks it provides, you can build really complex and interesting things.
Be aware, though, that Minecraft: Pi Edition is still in an early alpha stage and is prone to freezing and crashing, so I advise patience.
Infos
- Minecraft: https://minecraft.net/
- Minecraft: The Story of Mojang (Documentary): http://minecraftstoryofmojang.com/
- Minecraft: Pi Edition: http://pi.minecraft.net/
- Minecraft Pi package: https://s3.amazonaws.com/assets.minecraft.net/pi/minecraft-pi-0.1.1.tar.gz
- Block types: http://www.piprogramming.org/wiki/index.php?title=Minecraft_Block_Types_List
- A cannon always comes in handy: http://www.stuffaboutcode.com/2013/04/raspberry-pi-minecraft-cannon.html
- Play Snake within Minecraft: http://www.raspberrypi.org/archives/4615
« Previous 1 2 3 Next »
Buy this article as PDF
Pages: 6
(incl. VAT)