Archive | March, 2013

Scratch Programming: Meet Winky!

26 Mar

Scratch, what is Scratch?  I’m glad you asked (kind of).  Scratch is an amazing program on my Raspberry Pi.  It came with the Raspbian Wheezy Linux that I installed.  It’s so simple and fun that I want to experiment with it every day.  Most nights, I spend the last half hour before bed learning more about Scratch.

You can download Scratch for a Windows, Mac, or Linux computer and you can also put it on your Raspberry Pi if it’s not already there.  Also, they are beta testing version 2.0 and you can use it online even from a Chromebook or netbook.  Unfortunately, you can’t save your files online, but you can download them to your computer to work on later.

Scratch is a programming language but you don’t need to memorize code.  Instead of creating a while loop, you just drag a “forever-if” block onto the stage.  You just type a couple of numbers instead of a lot of code.  There are blocks to show/hide the character, move him, detect collisions, do math, draw shapes, keep score, and more.  With all of these blocks, you can create games, videos, animations, RPGs, classic video games, and anything else your brain can imagine.

Then, you can upload your Scratch projects to share with the rest of the world.  Or you can see what other brilliant people have done with Scratch.  Just go to http://scratch.mit.edu There are more than 3 million projects there already!

I have an ebook called Super Scratch Programming Adventure.  It teaches you how to do great projects.  Sometimes I struggle, though, because it doesn’t give you all of the details and you have to figure some things out by yourself.  A couple of times, I’ve wasted a lot of time doing it wrong and I don’t figure it out until later.  Like one time, I spent hours drawing these new costumes and it turned out that they were supposed to be sprites.  Luckily, my dad got on the Google+ Scratch page and asked for help and the nice people helped us figure out how to convert costumes to sprites.  Then my Linux got corrupt and I had to reinstall and I lost everything anyhow.

So far, I’ve uploaded one project to the Scratch website.  I was using a Scratch tutorial that was teaching how to move the usual cat character, Scratchy, around the screen.  I decided to change it to a fish and change the background to an aquarium.  The tutorial helped me move him in the shape of a star and drop a pen to make him draw a star.  My dad wasn’t happy that when the fish moved to the left, he was facing to the right and it didn’t look realistic.  So, I figured out how to tell when he’s moving left and made him face left and when he’s moving right and made him face right.

But that wasn’t cute enough for an 11 year old girl, so I had to add my own touch to it.  I added some animation to make my fish (named “Winky”) wink after he drew the star.  All I did was color in his eye with the same color as his body (my dad had to teach me what the eye dropper does) and then draw a black line.  Even though it’s just an eye and then a line and then an eye, it really looks like he’s winking!  OK, enough talk, let me show you my new pet . . . Winky!  Oh, yeah, I almost forgot.  I also made the star rainbow colored!  Awesome!!!  http://scratch.mit.edu/projects/krystal92586/3178144

Here’s a simple tutorial on the basics of Scratch:

Installing Minecraft on my Pi!

11 Mar

Wow, nothing is easy in Linux, is it???  Today, I tried to install Minecraft on my Pi and the directions sounded easy enough.  But, it took me way over an hour to complete.  First, my wifi wouldn’t connect.  I tried 50 times, rebooted 10 times, typed the password in 100 times and it wouldn’t work, just kept saying something about a four-way handshake and a supplicant* (whatever that is) and then started over again in an endless loop.  Finally, just as I was typing in a request for help on the raspberrypi.org forum, it just started working!

So, then, I followed the directions exactly to install Minecraft and guess what . . . it didn’t work!  I kept getting EOF errors that were “unrecoverable.”  I tried again and again and again and it just wouldn’t work.  So, I read online about a guy who had to download and delete the file four or five times before it finally worked.  It took me seven times, but finally when I typed “tar -zxvf minecraft-pi-0.1.1.tar.gz” the screen lit up with text and I squeaked a little bit with excitement.  I typed “cd mcpi” and then “./minecraft-pi” and it worked!!!  My dad was sitting with me and heard me get excited about everything that it said on the screen.  I yelled out “It’s building terrain!” and “It’s saving chunks” as the words popped up.

Here’s a picture of my screen:

Image

I got really excited when I realized that it’s the full version of Minecraft, not the lite version that I have on my iPod.  I quickly realized how the controls work: “w” to walk forward, “a” to walk to the left, “s” to walk backwards, “d” to walk to the right, and spacebar to jump.  Pressing “e” takes you to the inventory of all of your supplies.  Also, the left click on the mouse breaks blocks, the right click places things, and the scroll wheel moves through your on-screen inventory.  It scared my parents to see how excited I was about having dynamite in my inventory!  This is sooooooooo much fun!

Here is where I got the instructions for installing minecraft on my Pi: http://pi.minecraft.net/

* “Failed to enable network in wpa_supplicant configuration”

Here are instructions how to install Minecraft for Pi even if your Pi is not connected to the internet:

 

Update______________________

Since this post, I’ve had trouble with Minecraft on my Pi.  I plugged in my Pi to play one day and the whole program was gone.  So, I reinstalled it and played for 5 seconds before the Pi crashed.  When I restarted, the program was gone again.  There was no mcpi folder.  The tar.gz was not in the tmp folder.  It was gone.  So, I went through this same process about 8 more times with the same result.  I tried it on another memory card and it didn’t work there either.  It seems that version 0.1.1 isn’t working for me anymore 😦  I’m sad and don’t know how to fix this.  Any ideas?  Please post in the comments.