Learn to Program with Minecraft

Book Review: ‘Learn to Program With Minecraft’

Books Computing Gaming Reviews Technology Videogames

program-with-minecraft

I enjoyed reviewing a programming book from No Starch Press back in January. So when they contacted me about doing a review of Learn to Program With Minecraft, I jumped at the chance. I’m glad I did. Learn to Program With Minecraft is an excellent programming guide for Minecraft players.

Learn to Program With Minecraft teaches programming concepts using the Minecraft API for Python. The API (Application Programming Interface) opens the door for budding programmers to modify their Minecraft worlds with code. They program using Python, a programming language that is free and easy to learn. Python and the Minecraft API are compatible with Windows, Mac, and Raspberry Pi platforms. The concepts and programming exercises in the book work across all platforms.

The book is written to new programmers and organized into 12 chapters. Author Craig Richardson starts with installing Python and the Minecraft Tools. This is a technical process. But Richardson removes the intimidation by providing step-by-step guidance. He even shares common issues encountered and explains how to overcome them. You can be up and running quickly, even if you’ve never done anything like this before.

The rest of the book is a guide to programming cool things in your Minecraft world. Beginning programming concepts are introduced such as variables, using math to manipulate your Minecraft world, and strings. The concepts are presented in understandable context and put into practice through ‘missions’. Python and the Minecraft API allow for immediate feedback. If the program is correct, the Minecraft world updates immediately. Missions are structured to allow for tinkering through code customization too. The player will be teleporting across the world and creating flyby’s, all with programming.

LTPWM_spread_052-053
Early missions introduce basic programming concepts like variables and math

Missions progress to intermediate programming concepts like Booleans, if-else statements, counting, and loops. These missions prime the imagination for doing very cool things in your Minecraft world such as creating mini-games. Richardson also introduces programming best practices. For example, your programs grow as your ideas and abilities grow. Richardson counsels you to validate your code as you program. Verify each part functions before moving onto the next. It’s good advice and saves loads of frustration if heeded.

LTPWM_spread_128-129
As missions progress so does the programmer’s abilities

The later chapters teach the use of functions, files, and introduce object-oriented programming. These more advanced concepts demonstrate the power of Minecraft programming. For instance, entire buildings can be constructed with code. These constructions can be saved and reused. Mission has the user create code to construct pillars. It’s a building sub-assembly created instantly when the code is executed. The player can construct large-scale structures with speed and repeatability. Very cool stuff.

LTPWM_spread_202-203

Learn to Program With Minecraft is 297 pages brimming with potential. It’s an excellent guide for Minecraft players wanting to expand their capabilities in the game and with programming. I gave it to my 13 year-old son to try. He had a blast. And to be fair, programming is hard. Proficiency requires discipline and practice. But this book does a great job of using a well-loved game to make the practice enjoyable and rewarding. Highly recommended.

If you want to try a few missions, No Starch Press offers Chapter 7 free for download. you can also download the Minecraft Tools and all the code examples. Finally, you can order the book on the No Starch Press website or from Amazon.

Thanks to No Starch Press for providing the review copy.

Liked it? Take a second to support GeekDad and GeekMom on Patreon!
Become a patron at Patreon!