Here's your ticket to a world of adventures with Minecraftand programming. Learn how to extend Minecraft and create a new gamingexperience, by exploring the magical world of Minecraftprogramming. Adventures in Minecraft, like other books in thehighly successful Adventures series, is written especially for 11-to 15-year-olds. With this book you will learn new programmingskills while having fun with Minecraft! Minecraft programming experts David Whale and Martin O'Hanlonwalk you step-by-step through everything you need to know to: * Get started writing Minecraft programs in Python on your PC,Mac, or Raspberry Pi * Build houses and other structures in the blink of an eye, andmake a 3D duplicating machine * Write interactive games like a field that charges you rent, anda treasure hunt using magic vanishing bridges * Build custom game control panels using simple electroniccircuits * Easily build huge 2D and 3D structures such as spheres andpyramids * Build intelligent objects like a massive Minecraft clock, andprogram an alien invasion * Plan and write a complete interactive arena game Using the programming skills you learn from this book, writingMinecraft programs offers endless possibilities to create anythingyou can imagine. To make your journey that much easier, the Adventures inMinecraft companion website supplies you with avideo for each adventure in the book, downloadablecode files, helpful programming reference tables, a bonusadventure, and badges to collect for your Minecraftaccomplishments. By day, David Whale and Martin O'Hanlon are software engineerswho design computer products. By night, they play Minecraft anddevelop exciting new programs that interact with the Minecraftworld. They both work regularly with young people in schools,computing clubs and at community events, giving talks aboutMinecraft programming and running programming workshops.



Autorentext

Martin O'Hanlon (Birmingham, UK) describes himself as a professional geek and amateur snowboarder. Martin blogs about Minecraft and Raspberry Pi at http://www.stuffaboutcode.com/.

David Whale (Essex, UK) runs the Saturday Club, where kids learn Minecraft and the Raspberry Pi, among other things. David was the Tech Editor on Adventures in Raspberry Pi.



Zusammenfassung

Here's your ticket to a world of adventures with Minecraft and programming.

Learn how to extend Minecraft and create a new gaming experience, by exploring the magical world of Minecraft programming. Adventures in Minecraft, like other books in the highly successful Adventures series, is written especially for 11- to 15-year-olds. With this book you will learn new programming skills while having fun with Minecraft!

Minecraft programming experts David Whale and Martin O'Hanlon walk you step-by-step through everything you need to know to:

  • Get started writing Minecraft programs in Python on your PC, Mac, or Raspberry Pi
  • Build houses and other structures in the blink of an eye, and make a 3D duplicating machine
  • Write interactive games like a field that charges you rent, and a treasure hunt using magic vanishing bridges
  • Build custom game control panels using simple electronic circuits
  • Easily build huge 2D and 3D structures such as spheres and pyramids
  • Build intelligent objects like a massive Minecraft clock, and program an alien invasion
  • Plan and write a complete interactive arena game

Using the programming skills you learn from this book, writing Minecraft programs offers endless possibilities to create anything you can imagine.

To make your journey that much easier, the Adventures in Minecraft companion website supplies you with a video for each adventure in the book, downloadable code files, helpful programming reference tables, a bonus adventure, and badges to collect for your Minecraft accomplishments.

By day, David Whale and Martin O'Hanlon are software engineers who design computer products. By night, they play Minecraft and develop exciting new programs that interact with the Minecraft world. They both work regularly with young people in schools, computing clubs and at community events, giving talks about Minecraft programming and running programming workshops.



Inhalt

Introduction 1

What Is Minecraft? 1

The Virtual World 2

How Did Minecraft Come About? 2

What Is Minecraft Programming? 2

Who Should Read This Book? 3

What You Will Learn 4

What We Assume You Already Know 5

What You Will Need for the Projects 5

A Note for Parents and Teachers 6

How This Book Is Organised 7

The Companion Website 8

Other Sources of Help 9

Conventions 9

Reaching Out 11

Adventure 1 Hello Minecraft World 13

Setting up Your Raspberry Pi to Program Minecraft 15

Installing Minecraft on Your Raspberry Pi 16

Starting Minecraft on Your Raspberry Pi 17

Setting up Your PC or Apple Mac to Program Minecraft 19

Installing the Starter Kit and Python on Your Windows PC 20

Installing the Starter Kit and Python on Your Apple Mac 22

Starting Minecraft on Your Windows PC or Apple Mac 24

Stopping Bukkit 27

Creating a Program 28

Running a Program 30

Stopping a Program 33

Adventure 2 Tracking Your Players as They Move 35

Sensing Your Player's Position 36

Getting Started 38

Showing Your Player's Position 38

Tidying Up Your Position Display 41

x ADV EN T URE S IN MINECRAF T

Using postToChat to Change Where Your Position Displays 43

Introducing a Game Loop 43

Building the Welcome Home Game 45

Using if Statements to Make a Magic Doormat 46

Checking if Your Player Is at a Particular Location 47

Building a Magic Doormat 48

Writing the Welcome Home Game 49

Using Geo-Fencing to Charge Rent 53

Working out the Corner Coordinates of the Field 54

Writing the Geo-Fence Program 56

Moving Your Player 58

Further Adventures in Tracking Your Player 61

Adventure 3 Building Anything Automatically 63

Creating Blocks 64

Building More than One Block 66

Using for Loops 67

Building Multiple Blocks with a for Loop 67

Building a Huge Tower with a for Loop 69

Clearing Some Space 71

Using setBlocks to Build Even Faster 71

Reading Input from the Keyboard 72

Building a House 74

Building More than One House 79

Using Python Functions 80

Building a Street of Houses with a for Loop 83

Adding Random Carpets 85

Generating Random Numbers 85

Laying the Carpets 86

Further Adventures in Building Anything 89

Adventure 4 Interacting with Blocks 91

Finding Out What You Are Standing On 92

Finding out if Your Feet Are on the Ground 92

Building Magic Bridges 95

Using Python Lists as Magic Memory 98

Experimenting with Lists 98

Building Vanishing Bridges with a Python List 101

TABLE OF CONTENTS xi

Sensing that a Block Has Been Hit 105

Writing a Treasure Hunt Game 108

Writing the Functions and the Main Game Loop 109

Placing Treasure in the Sky 110

Collecting Treasure when It Is Hit 111

Adding a Homing Beacon 112

Adding Your Bridge Builder 113

Further Adventures in Interacting with Blocks 115

Adventure 5 Interacting with Electronic Circuits 117

What You Will Need for this Adventure 118

Prototyping Electronics with a Breadboard 121

Building a Circuit that Lights an LED 123

Connecting Electronics to Your Computer 124

Setting Up the PC or Mac to Control Electronic Circuits 1…

Titel
Adventures in Minecraft
EAN
9781118946848
Format
E-Book (pdf)
Hersteller
Digitaler Kopierschutz
Adobe-DRM
Dateigrösse
29 MB
Anzahl Seiten
320