We have released a new book addressed to boys and girls who love to play Minecraft and want to learn programming in order to achieve more with the help of new knowledge.

The book is specially written for those who not only loves to play, but also wants to create something new. You can easily learn programming, just playing Minecraft. This will help you simple step-by-step instructions that allow not only to write a program in Python, but also to build a house, a fantastic structure or even a 3D copy machine. You can create your own interactive games, search for treasures and even build incredible giant 2D and 3D objects (spheres and pyramids).
')
All in your power - build a huge working Minecraft clock, plan an alien attack and even a battle. The programming skills learned in this book will allow you to uncover the incredible features of Minecraft that are inaccessible to your friends and acquaintances.
What is Minecraft
Minecraft is an indie sandbox game where you can build buildings, collect items, mine minerals and fight monsters. It looks like a three-dimensional virtual world consisting of different cubic blocks; each block takes its place in the three-dimensional lattice of the world. The figure at the beginning of the post shows an example of the landscape in the world of Minecraft.
Virtual world
In games related to the genre of sandbox, the player is inside the virtual world (as in the usual children's sandbox, but very large). Instead of going through certain levels in a predetermined order, here you travel around the virtual world and make decisions based on your goals and the means to achieve them. Since the choice has to be made at the very beginning, sandbox games have almost unlimited possibilities. You create your own scenes and move in a three-dimensional world, acquire new skills and capabilities, discovering them by chance or in the course of experiments.
The character in Minecraft is the embodiment of the player, his avatar is called Steve. The player controls Steve in the virtual world, seeking to achieve the goal. If you manage to safely survive the first night, when the monsters are overcome, you can follow your goals, interact with other players and build huge buildings, limited only by your own imagination. Sandbox games allow the player to decide for himself how to play the game without forcing him to move along the routes laid down by the creators of the game.
About programming in Minecraft
This book is about programming: Minecraft is used as a way to learn programming. If you are looking for advice on how to build different buildings and win battles, it is better to turn to other books on the subject.
Programming in Minecraft, you can make the game more exciting, creative and individual. When playing a regular game, players follow the basic rules of Minecraft laid down by the creators. And by adding your own programs that interact with the game world of Minecraft, you can automate the solution of complex and repetitive tasks, such as building long streets with houses and gigantic buildings. You can give the game and its objects new styles of behavior, add new elements that the authors have not thought of. But the most important thing is that in this way you will acquire a universal skill - the ability to program in the Python language, which can be used more widely, not only for programming in Minecraft. Figure 1 shows a long street with buildings, built using a short Python program.
Fig. 1. Long street with buildings, built by 20-line program in PythonWhat do you learn
You will learn about the many sides of Minecraft and how to influence its behavior using Python programs. Unlock the mystery of addressing blocks in a three-dimensional world using coordinates. Learn how to locate a character, create and delete blocks in Minecraft, and how to determine which block is selected by the player.
You will learn how to set up and run your own Minecraft local server using the community created craft-bukkit server and programming it using the Minecraft software interface.
You will learn how to write programs in the Python language: from the simplest ones, such as “Hello, Minecraft World!” To complex, interacting with huge three-dimensional objects, which, thanks to new programming skills in Python, are easy to stamp.
Using the free module MinecraftStuff, which is part of the library in the Python language, you can create two- and three-dimensional objects from blocks, draw lines and polygons, and also display text.
On the structure of the book
Each chapter in the book - a separate adventure, teaching new skills and concepts in the process of programming and testing the project. The book is organized so that each adventure corresponds to a separate project that does not depend on others. Although, perhaps, it will be easier for someone to master them in order and get acquainted with new programming concepts gradually.
It is very important that you first read Adventure 1, because it describes how to download and install everything you need and make sure everything is working properly. In this adventure, we will list the main steps that will have to perform in the following adventures, and we will remind them throughout the first adventures.
The first three adventures are written for those who know little or know nothing about programming at all. We will explain all the terms and concepts as we meet them. In Adventures 2, 3 and 4, the key elements of any good Minecraft game are considered. Among them: the definition of events taking place in the world of Minecraft; performing simple calculations and creating programs that react differently, for example, sending chat messages or automatically creating blocks. These three key concepts - definition, calculation and response - we will use throughout the book to create large and exciting Minecraft programs.
Adventure 5 is based on knowledge gained in previous adventures. Here we explore some interesting ways to connect Minecraft’s virtual world to the outside world. In particular, methods for storing large amounts of data in files for copying and playing large structures using a three-dimensional "copy machine" are considered.
Adventures 6 and 7 introduce MinecraftStuff module, which allows using blocks to create lines, circles and other two-dimensional figures, as well as some fantastic three-dimensional spheres and pyramids. They can be the basis for the construction of giant structures, which are very difficult to create manually. Adventure 7 shows how to give moving objects individual features to make their movements more or less reasonable. Having mastered these techniques, you will be able to write exciting "games within the game," which will surely amaze your friends.
Adventure 8 will require knowledge of all the concepts and programming skills gained in previous adventures to create the final project - an interesting game of points with moving objects that must be avoided or, on the contrary, used to move.
More information about the book can be found on
the publisher's website :
Table of contentsExcerptFor Habrozhiteley a 20% discount on the coupon -
Minecraft