My Christmas Python Project 1 – Minecraft Pi Projects from Stuff About Code

My Christmas Python Project 1 – Minecraft Pi Projects from Stuff About Code

Last week I decided I would dedicate some time in between Christmas and New Year to improving my Python skills with some fun projects.

The first project I came across when looking for fun things to do was the Minecraft Pi projects on <Stuff about=”code”/>. The website from Martin O’Hanlon details the projects he has done using Minecraft Pi edition, and I saw some really cool stuff on there that I fancied trying, specifically, the Hide and Seek game and the Planetary Gravity Sim.

To get set up I first needed to install Minecraft Pi, as my Raspbian operating system is older than September 2014, I did not already have it installed. Installing & running was pretty easy, I simply opened the terminal and typed the following commands;

  1. sudo apt-get update
  2. sudo apt-get install minecraft-pi
  3. minecraft-pi

The projects on this website use the Minecraft API, which allows us to write programs that can hack the minecraft world, without changing the game itself. It works by changing the server running underneath the game, using the python library. The API Tutorial gives a good introduction to the basics, and with my previous knowledge of python, I managed to grasp a basic understanding of the functions used to manipulate the minecraft world.

I enjoyed getting to grips with the basics and playing around with the code. I pretty much just made myself poop flowers as I walked and made big blocks of tnt and blew stuff up but it was still fun!

After this the site takes a bit of a jump from teaching someone the very basics of programming in minecraft to just showing examples of what you can do with little or no explanation on how the functions are working. At this point you tend to be provided with examples of code to try out, either by retyping the code out for yourself or just running from github in the terminal.

My first project was the Hide and Seek game. I was a little disappointed that there was no teaching element to the projects, but I decided to type out the code using IDLE and see if I could follow what was going on. For the most part this code was relatively simple, and although I found that I could follow it as I typed, as the comments within the code were a big help, I’m not sure given the basic knowledge from the tutorial I would have been able to come up with something like this from scratch.

My first execution of the program had a few glitches where I had made some errors copying the code over, but thanks to the tracebacks I was easily able to find the mistakes in my code and get them rectified. Hide and Seek was quite a fun project, and it as nice to be able to see your results in the minecraft world, but after finishing I wasn’t sure exactly how much I had really learnt.

I moved on to the next project I had picked out, which was the Planetary Gravity Sim. Again I started by retyping the code into IDLE, but this one did not manage to hold my attention. Very quickly the code became too complicated for me to follow, and if I’m not understanding something, I’m not enjoying what I’m doing. I got bored of typing this code quite quickly, and instead decided to run it straight from github just to see what I was supposedly creating, but it didn’t work, so I gave up.

<Stuff about=”code”/> has some great projects than Martin has developed for minecraft pi, but this is more of a showcase for the projects than lessons on how to be able to do something like this yourself. I’m not sure that it’s a learning resource I will be able to use, so even though I had fun with the Hide and Seek game, I think I’ll move on to something else.

Thanks for reading!
Like me on Facebook - Follow me on Instagram - Follow me on Twitter

2 thoughts on “My Christmas Python Project 1 – Minecraft Pi Projects from Stuff About Code”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.