nd Edition David Whale Martin O'Hanlon'/> Adventures in Minecraft
Adventures in Minecraft

Chapter

Adventure 1 Hello Minecraft World

Setting Up Your Raspberry Pi to Program Minecraft

Downloading the Starter Kit

Starting Minecraft on Your Raspberry Pi

Setting Up Your PC or Apple Mac to Program Minecraft

Installing the Starter Kit and Python on Your Windows PC

Installing the Starter Kit and Python on Your Apple Mac

Starting Minecraft on Your Windows PC or Apple Mac

Stopping the Minecraft Server

Creating a Program

Running a Program

Stopping a Program

Adventure 2 Tracking Your Players as They Move

Sensing Your Player’s Position

Getting Started

Showing Your Player’s Position

Tidying Up Your Position Display

Using postToChat to Change Where Your Position Displays

Introducing a Game Loop

Building the Welcome Home Game

Using if Statements to Make a Magic Doormat

Checking if Your Player Is at a Particular Location

Building a Magic Doormat

Writing the Welcome Home Game

Using Geo‐Fencing to Charge Rent

Working Out the Corner Coordinates of the Field

Writing the Geo‐Fence Program

Moving Your Player

Further Adventures in Tracking Your Player

Adventure 3 Building Anything Automatically

Creating Blocks

Building More Than One Block

Using for Loops

Building Multiple Blocks with a for Loop

Building a Huge Tower with a for Loop

Clearing Some Space

Using setBlocks to Build Even Faster

Reading Input from the Keyboard

Building a House

Building More Than One House

Using Python Functions

Building a Street of Houses with a for Loop

Adding Random Carpets

Generating Random Numbers

Laying the Carpets

Further Adventures in Building Anything

Adventure 4 Interacting with Blocks

Finding Out What You Are Standing On

Finding Out if Your Feet Are on the Ground

Building Magic Bridges

Using Python Lists as Magic Memory

Experimenting with Lists

Building Vanishing Bridges with a Python List

Sensing That a Block Has Been Hit

Writing a Treasure Hunt Game

Writing the Functions and the Main Game Loop

Placing Treasure in the Sky

Collecting Treasure When It Is Hit

Adding a Homing Beacon

Adding Your Bridge Builder

Further Adventures in Interacting with Blocks

Adventure 5 Using Data Files

Reading Data from a File

Interesting Things You Can Do with Data Files

Making a Hint‐Giver

Building Mazes from a Data File

Understanding CSV Files

Building a Maze

Building a 3D Block Printer

Hand‐Crafting a Small Test Object to 3D Print

Writing the 3D Printer

Building a 3D Block Scanner

Building a Duplicating Machine

Writing the Framework of the Duplicating Machine Program

Displaying the Menu

Building the Duplicator Room

Demolishing the Duplicator Room

Scanning from the Duplicator Room

Cleaning the Duplicator Room

Printing from the Duplicator Room

Listing Files

Further Adventures in Data Files

Adventure 6 Building 2D and 3D Structures

The minecraftstuff Module

Creating Lines, Circles and Spheres

Drawing Lines

Drawing Circles

Drawing Spheres

Creating a Minecraft Clock

Drawing Polygons

Pyramids

Further Adventures with 2D and 3D Shapes

Adventure 7 Giving Blocks a Mind of Their Own

Your Block Friend

Using Random Numbers to Make Your Block Friend More Interesting

Bigger Shapes

Alien Invasion

Further Adventures in Simulation

Adventure 8 Building a Game Controller with a BBC micro:bit

What You Need for This Adventure

What Is a BBC micro:bit?

Understanding Inputs and Outputs

Using Your BBC micro:bit as a Game Controller

Setting Up Your Computer to Connect to Your BBC micro:bit

Plugging In Your BBC micro:bit

Loading the Game Controller Code onto Your BBC micro:bit

Hello BBC micro:bit

Sensing Button Presses

Using Your BBC micro:bit Display

The Magic Doormat Revisited

Developing the Magic Doormat Program

Designing Your Own Icon for the Display

Making a Detonator

Attaching a Banana to Your BBC micro:bit

Sensing Touch Inputs

Writing the Detonator Program

Writing a Ball‐Rolling Game

Building the Structure of the Program

Adding a Button and a Countdown

Building the Game

Sensing Tilt Movements with Your BBC micro:bit

Moving the Ball When You Tilt Your BBC micro:bit

Collecting Items from the Table

Finishing the Game Play

Adding a Time Penalty for Falling into a Hole

Further Adventures with Your BBC micro:bit Game Controller

Adventure 9 The Big Adventure: Crafty Crossing

A Game within a Game

Part 1: Building the Arena

Part 2: Creating the Obstacles

The Wall

Building the River

Creating the Holes

Part 3: Game Play

Starting the Game

Collecting Diamonds

Out of Time

Tracking the Player

Setting the Level as Complete and Calculating Points

Adding the Game Over Message

Part 4: Adding a Button and Display

Set Up the BBC micro:bit

Countdown Clock

Diamonds to Collect

Further Adventures in Your Continuing Journey with Minecraft

Appendix A Where to Go from Here

Websites

Minecraft

Python

Others

Other Ways to Make Things Happen Automatically

Projects and Tutorials

Videos

Books

Appendix B Quick Reference

Glossary

Index

EULA

The users who browse this book also browse


No browse record.