Raspberry Pi Projects
Raspberry Pi Projects includes a number of hands-on projects to help you get the most from your Raspberry Pi. The book includes projects to create classic arcade games using Python and Pygame, shows how to create an information centre that connects to Twitter and Facebook, and demonstrates how to use the Raspberry Pi's general purpose input/output (GPIO) pins to connect up your own hardware projects to the Raspberry Pi.
The book is written by Andrew Robinson and Mike Cook, who was my co-author on Raspberry Pi For Dummies. I have contributed one chapter to the book, showing how you can use Python to write programs that build things in Minecraft Pi Edition.
My Python project creates a randomly generated maze that you can walk around in the Minecraft world. It uses an algorithm for creating 'perfect' mazes, which have no areas locked off that you can't reach.
Buy the book at your favourite shop here
Screenshots of the Minecraft Python Maze Maker project
You can watch the maze being built from above
Trapped in the library: You can configure the maze to build walls using your chosen blocks, as this maze of bookshelves shows.
Download the code
Download the code here (rpi-mazemaker.zip). You can customise the code where indicated to change the size, location and style of your maze. For full details of how the program works, please see the book.
WARNING: This program bulldozes part of the Minecraft world before construction begins, including an area surrounding the maze, and the area above it. I recommend you create a new Minecraft world to build your maze in, and proceed with caution before using the maze maker near any structures or world features you want to keep.
You can find the codes for the different Minecraft materials here.
Feedback and updates
I'll post updates on the book here. You can also follow me on Twitter.
©Sean McManus. www.sean.co.uk.