Lesson 1:
Introduction and Setup
So IÕm sure
youÕll all be very pleased to know that our lesson plan this time involves
programming Minecraft! Minecraft, for those of you who don't know is a game
about building and breaking blocks to build beautifully amazing structures, just as
your imagination intended.
Picture:
Someone here has built a house, garden, and what seems to be a swimming pool.
Soon weÕll see
what you can doÉ
The difference
though is that most people that play Minecraft just use a mouse to click and
drag/drop pre-made blocksÉ What we aim to teach you to do is to learn the
coding behind the game which will enable you to build whatever blocks you want,
build intricate structures very quickly, and at the end of the lesson plan,
race your friends in a game of ÒWho Can Build the Best Maze?Ó
Raspberry Pi? WhatÕs that?
So youÕre
probably sitting in front of your computer right now with a little see-through
box and a bunch of wires staring down and thinking, Òwhat is that and what am i
supposed to do with it?Ó. Well, basically what youÕre looking at is a cheap,
small computer that plugs in to a monitor and uses a regular keyboard and mouse
to operate it. It is a great way to teach students about computing, especially
in languages such as Python (which youÕve had an introduction to and shall
continue to use in these chapters). We will be using the Raspberry Pi to run a
pi-based version of Minecraft (which should already pre-installed on your SD
cards[1]).
Setting Up the Pi
So, first
things first, hereÕs a list of the items that should be in your possession:
[1] SD card: the memory card inserted
into the underside of the Pi; it can vary in memory size and be interchanged,
but you should be working with a 4 or 8GB card pre-installed with a software
called NOOBS. Consult your supervisor/teacher if you do not have one of these
already.
1)
The Raspberry Pi with its power cable
2)
A HDMI cable (or any cable that connects from the Pi to a monitor)
3)
A keyboard and mouse
Getting it Up and Running
1)
Task
number 1? Well youÕll need to plug in all your cables; plug the Pi into a power
socket, put the SD card in the Pi, and connect the monitor, keyboard, and mouse
to the Pi. If there is a green/red light lit up on the Pi, you're ready to
go!
***(On a
side-note, this setup chapter may be tedious and slow, but once you get
everything set up and running smoothly you'll have nothing to worry about
except having fun by playing and hacking Minecraft, and letting you
imaginations run wild.)***
2)
On
your screen now you should see a bunch of different softwares that you can run
on the Pi. The on you want is the recommended one, called Raspbian.
Select this one and wait for it to finish downloading before continuing (should
take 5 to 10 mins).
3)
If
for any reason you do not have Minecraft already installed on your PiÕs, then
you should visit this website (http://pi.minecraft.net) and download the free version
onto the Pi. You then may need to unzip the file (by double clicking or right
clicking and pressing unzip). You should unzip this file, called mcpi,
and put it on your desktop for easy access.
4)
Click
on the minecraft-pi file to run it and you should be good to go! (If clicking
on it doesn't work you may have to open a program called Terminal. In there
type cd Desktop/mcpi followed by pressing the enter key. Then type ./minecraft-pi
and the enter key again. This should open up minecraft for you).
5)
Now
feel free to walk around the world and explore a bit. Every time you exit the
game and reopen it, it should save your progress, so don't worry about losing
any work that you do. Use these
controls to navigate the Minecraft world. Spend a solid amount of time doing
this so that you get used to the game and understand how it works. If in doubt,
use the internet to look up different things people have created using
Minecraft (there are many funny videos on youtube.com) ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ>
6)
After
exploring for a while, youÕll want to start hacking Python, and learn the
coding behind the game to help you build and play at a deeper level. To do this
you should start by opening another program called IDLE which should be on the
Desktop (make sure you're using IDLE and not IDLE3!) Save the file where ever
you want by going to File > Save or using the shortcut buttons Ctrl + S.
7)
The
classic test that computer scientists and/or programmers carry out on a new program
or with a new language is the Hello World test, where you get the program to
display the message ÒHello World!Ó. Lets try to do this:
1)
type
this into your IDLE window exactly as displayed. ->
8)
Save
the file and then run it by pressing F5
Make sure you
become comfortable with all of these steps. The instructions above should be
sufficient for getting you set up and started with Minecraft and the Raspberry
Pi, but in the event of confusion or misunderstanding, don't forget that you
have a little resource called the internet, and maybe even your teachers will
be able to provide assistance. Good luck!
Refrences:
http://www.raspberrypi.org/learning/getting-started-with-minecraft-pi/worksheet/
https://www.youtube.com/watch?v=-sUlfaN-vXA
https://pihw.wordpress.com/guides/direct-network-connection/
http://www.raspberrypi.org/help/noobs-setup/