Skip to Content
Learning Python with Raspberry Pi
book

Learning Python with Raspberry Pi

by Ben Everard, Alex Bradbury
March 2014
Beginner
286 pages
5h 34m
English
Wiley
Content preview from Learning Python with Raspberry Pi

Chapter 8

Minecraft

FOR THE UNINITIATED, Minecraft is a game of survival where your character can build things and acquire materials by mining the world around him. It's set in a world of blocks, and each of these blocks can be destroyed to reveal hidden treasures. Figure 8-1 shows a typical Minecraft world.

That's a pretty inadequate description, but it should give you an idea of what's going on. There's a full version that you can play on most computers, and there's a special version unique to the Raspberry Pi. The special thing about the Pi version is that you can control the game through Python. Not only can you move your player, but you can also manipulate the entire world around you.

Figure 8-1: The 3D blocks have become emblematic of this game.

9781118717059-fg0801.tif

Exploring Minecraft

That's enough trying to explain it, though. Minecraft is one of those things that you really have to see to understand. First of all, you'll need to download the software from http://pi.minecraft.net.

You should end up with a file called minecraft-pi-0.1.1.tar.gz. You can extract this archive through the terminal with this command:

tar zxvf minecraft-pi-0.1.1.tar.gz

Then, you can start the game with this command:

mcpi/minecraft-pi

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learn Raspberry Pi Programming with Python

Learn Raspberry Pi Programming with Python

Wolfram Donat
Python Programming with Raspberry Pi

Python Programming with Raspberry Pi

Srihari Yamanoor, Sai Yamanoor

Publisher Resources

ISBN: 9781118717035Purchase book