Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 22462

Import Python: Learn to program with minecraft - Book Review

$
0
0

Despite having build Education Software for a living I had no clue What Minecraft is ?. I am glad NoStarch asked me to review this book.

What is Minecraft ?

Minecraft is a sandbox video game. A game where you build constructions out of textured cubes in a 3D generated world. One can then explore worlds, do resource gathering, plan combat.

Seeing is believing, so just check out this user created video explaining What is Minecraft ?

Minecraft can be controlled using Python API. This is what the book offers, learn Python and create, control your world in Minecraft. It’s an excellent Edu-tainment approach for introducing programming to kids.

Installation

First thing First. It’s a Paid Game, 26.95 US $. So I started with a Mac and boy it was frustrating getting everything installed and working. I finally came to the conclusion that my Mac software was rather outdated. I switched to Windows and was able to get it running in no time. The author has put in detailed efforts in giving a step by step guide on installation and self hosted URL(s) to download software. It’s highly recommended that you follow the process as is. Also make sure you install the exact versions of the software.

Teaches the basics of Python

The Second chapter offers the basics of Python Programming Language. It does a good job of explaining in simple terms

  • Variables,
  • What’s a Program/Code ?
  • Data types like int, float,
  • Cartesian coordinates and 3D coordinates with x, y, z
  • How to use IDLE
  • Invoking Function calls
  • Running your Python Program that creates a Minecraft world.
  • Debugging

It’s a very well written chapter that ramps up the knowledge without hurry. Having worked with kids I feel that children of age group 12+ will be able to grasp the concepts of a Programming Language better then ones below. But that’s a personal belief based on years of working with children.

The third chapter touches on expressions, operators. With these we gain the ability to make interesting artifacts in the minecraft world like say a wall, pillar. Also you can move your character and jump over these objects. This is where the fun starts and ignites imagination on what all can be done/created. Just when I thought on How can i build a huge house/castle. The author shows as part of Mission 8 on how to build a shelter. All it took was an single API setBlocks. It’s pretty exciting to see it work. I found Mission 10 lot of fun, it shows you how to be like the hulk i.e. it teaches you to huge random jump. Let me tell you all it took was two lines of code. I recall was BASIC days, can’t think of achiveing this in two lines of code for sure. Kids today have it easy.

At this point I was pretty convinced that Minecraft is as useful tool to teach programming as is scratch. Minecraft is way more cool. After all it uses a real programming language unlike visual programming language where one doesn’t commit syntax error :-p

To talk is human

The fourth and fifth chapter shows

  • how to chat aka how to use sting data type to converse,
  • boolean types to evaluate user confirmation.
  • comparison operator to make use of math skills and evaluate location/postion in the minecraft world.

Not my favorite chapters since it’s more about Python string operations rather then making physical change to the minecraft world. But definitely an interactive way of learning string operations. I think the chapters could have been little short. But definitely teach a child How to do computation and accept user inputs making using code ?.

Decision Making in the Minecraft world

Finally we learn If, else and guess what Mission 26 is ? Blast a crater. A game where you don’t blow things up ain’t a game. Teaching a child to blow things programmatically is like WMD. I ended up writing elaborate program to recursively blow everything up. Boys will be Boys.

It’s time to move it move it

Chapter Seven shows a child how to use a while loop and move your character across the Minecraft world. Chapter Eight shows how to create your own functions so that repetitive code of construction blocks/shelters, character movement etc. This is where we build our first forest in Mission 41. The missions are very logical and all build on the knowledge acquired in previous Mission.

OOPS

Chapter 12 talks about OOPS. I am personally not sure if it was best to introduce kids to Object oriented programming as part of game design textbook. Kids of 12-14 years of age might find it overwhelming. Also the USP of this book till this point was Fun and learning going hand to hand. Kids who can’t understand the concepts will definitely stop here due to overwhelming nature of the content.

Besides the last chapter. It’s a fantastic book. I wish my son was 12 ( he is 3 ). If you have kid above age 12 and would like to teach him the basics of programming. I recommend this book.


Viewing all articles
Browse latest Browse all 22462

Trending Articles