Hardware Reference
In-Depth Information
Adventure 2
Tracking Your Players
as They Move
WHEN YOU PLAY Minecraft, you are playing a game that other people have designed
for you. The Minecraft world is fun, but it's even more fun if you can make it do the
things that you want it to do. When writing Minecraft programs in Python, you now
have a complete programming environment at your fingertips, and you can invent and
program anything you can possibly imagine. This adventure introduces you to some of
the fun things you can create using Minecraft and the programming language Python.
A really fun thing to do when programming Minecraft is to create a game within a
game. Minecraft is the “world”, and your program will make this world behave in new
ways. You will find that most Minecraft programs have three things that make them
fun and exciting: sensing something about the world, such as the player position; calcu-
lating something new, such as a score; and behaving in some way, such as moving your
player to a new location.
In this adventure you will learn how to sense your player's position and make different
things happen in the game as your player moves. In the welcome home game you build
a magic doormat that greets you when you walk on it. We'll introduce a technique
called geo-fencing using a real Minecraft fence, and your game will challenge you and
your friends to compete to collect objects in the fastest time possible. Finally you will
learn how to move your player by making your game catapult your player into the sky
if you don't get out of that field quick enough!
 
Search WWH ::




Custom Search