Star Wars Episode 3.14: A New Hope

Martin O’Hanlon is a co-author of Adventures in Minecraft which we featured back in November. The book’s full of incredible projects you can do with Minecraft, involving learning programming skills through building structures and interactive applications within the Minecraft world using the Python API provided in Minecraft: Pi Edition.

We don’t know how he comes up with some of the ideas, and we’re amazed by what he shows can be achieved (solar system in Minecraft, anyone?) but this one really blew us away. It’s an animation portraying the Death Star scene from the first Star Wars film.

Martin says:

After coding the Solar System in Minecraft I had the idea of creating the Death Star which would be able to ‘fire’ at the planets and destroy them. I ended up coding an animation of the Death Star destroying Alderaan right up to Luke flying down the trench and successfully bombing the exhaust port with a block of TNT.

ThatsNoMoon

You can try it out yourself too! Just open Minecraft Pi from the Desktop or applications menu and enter a world, then open a terminal window and enter the following commands:

git clone https://github.com/martinohanlon/minecraft-starwars
cd minecraft-starwars
python starwars.py

Then find a place to stand and watch the show!

If you want to learn more about what you can do with Minecraft Pi, see our getting started resource, make a Whac-a-block game (a resource contributed by Martin), see Martin’s website stuffaboutcode.com and check out the book Adventures in Minecraft.

See the code behind Minecraft Star Wars on GitHub.

19 comments

Avatar

That’s… incredible!

I guess it shouldn’t be too hard to use techniques like those used in http://www.raspberrypi.org/learning/gpio-music-box/worksheet/ to add suitable sound effects too? :-)

Avatar

You could! But Sam Aaron is working on integrating the Minecraft functions into Sonic Pi, so that could work really nicely :)

Avatar

Sonic Pinecraft? :)

Avatar

Indeed. I can’t wait!

Avatar

Sonicraft Minepi

Avatar

+1

Avatar

I know what my son will be doing on his RPi tonight…!

Avatar

Be careful he doesn’t get too carried away with the destruction…
http://www.raspberrypi.org/using-minecraft-raspberry-pi-edition-to-get-kids-computing/

Avatar

Got to see it in “avant-première” at 3rd Birthday Bash =o)

Nice job Mr O’Hanlon.

Martin Piwalker – Yoda says : “Truly wonderful, the Mine of a Craft is” && “Confer on you the level of JePi Knight, the Council does”

Avatar

Is some update planned for minecraft pi version or is it dead? The current version is pretty old and the mouse doesn’t work properly when window is resized/maximized. Also all this programming stuff works only locally. When I connect from one Pi to world on another Pi I don’t se anything created by the API.

Avatar

It would be great to see an update to Minecraft: Pi.

I dont see the same issues with the api multiplayer though. When you connect using the api are you specifying the IP of the Pi running the server i.e. mc = Minecraft.create(“192.168.1.1”).

Avatar

What I did is to start minecraft on one pi, run the clock as per http://www.stuffaboutcode.com/2013/02/raspberry-pi-minecraft-analogue-clock.html (there is mc = minecraft.Minecraft.create()) and I can see the clock ticking locally. Then I run minecraft from another pi and click join game and connect to the first pi. Both players can see each other but when the remote player follows the local one and both look at the same space in the sky where the clock is, the local one sees the clock but the remote one sees nothing or some snapshot of state of the world from the time when he joined the world.

Do you suggest I should connect via the (local) IP address in the API even if the script runs locally and then the dynamic worild changes done by API will be distributed to remote players? Will try that.

Avatar

i’d love to see an updated minecraft on the pi2 but it isn’t gonna happen. i’d love sound, music, animals and more types of blocks but not gonna see it.
it’s a stripped down version by design, so that kids and adults can code features into it by themselves and learn how to program at the same time.
more importantly, it’s a 100 million-a-year-earning intellectual property owned by microsoft and they ain’t gonna give away free, full-version copies that’ll eat into their profits.

Avatar

it looks great but when I tried it I got this .. since no one else has reported this and I know very little about minecraft it is most likely something obvious ..
also under what forum would one post minecraft questions?
pi@raspberrypi ~/minecraft-starwars $ python starwars.py
Traceback (most recent call last):
File “starwars.py”, line 18, in
mc = Minecraft.create()
File “/home/pi/minecraft-starwars/mcpi/minecraft.py”, line 171, in create
return Minecraft(Connection(address, port))
File “/home/pi/minecraft-starwars/mcpi/connection.py”, line 17, in __init__
self.socket.connect((address, port))
File “/usr/lib/python2.7/socket.py”, line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
raspi 2 ..

Avatar

The message is because the program cant connect to Minecraft.

Minecraft: pi needs to be running and the player needs to be in a world i.e. playing the game.

Avatar

thanks that was it.. if I continue on I will direct the comments to minecraft under gaming.. I’ve seen so much about it but never tried it .. learned something new!

Avatar

For the first few seconds while watching the video I thought that the player was going to try to attack the Deathstar with a sword :)

Avatar

That is something cool that someone would like to do with their Rpi! Can’t wait to get mine…

Avatar

Someone sould make a python program that you can drive a car around. Is that possible?

Leave a Comment

Comments are closed