Minecraft is a popular sandbox open world-building game. A free version of Minecraft is available for the Raspberry Pi; it also comes with a programming interface. This means you can write commands and scripts in Python code to build things in the game automatically. It's a great way to learn Python!
If you have already completed "Getting Started With Programming The Minecraft World" and want to do more, how about creating your own game in Minecraft, a "game in a game"?
The game you are going to create is called "Whac-a-Block", inspired by the original arcade game "Whac-a-Mole". The objective of the game is to whack (or hit with a sword) the blocks that light up as glowstone, and turn them back to stone.
This resource requires no additional hardware besides a Raspberry Pi with a Raspbian SD card.
Minecraft has been installed by default in Raspbian since September 2014.
If you do not have it installed, or you need to test it works, see the software installation page in the "Getting Started ..." resources.
If you are new to programming Minecraft: Pi Edition, you should complete "Getting Started With Programming The Minecraft World".
- The worksheet
- (Optional) Final version of Python code minecraft-whac.py
Unless otherwise specified, everything in this repository is covered by the following licence:
Making a Game with Minecraft by Martin O'Hanlon and the Raspberry Pi Foundation is licenced under a Creative Commons Attribution 4.0 International Licence.