It hasn’t been a week since Minecraft for the Raspberry Pi has been released, and already we’re seeing some cool builds that bridge our analog world with Minecraft voxel land. [Martin] got his hands on the Raspi version of Minecraft and decided to take advantage of the API Mojang threw into the build by making a huge analog block clock that keeps real world time in the Minecraft universe.
Basically, [Martin] created a small Python script that draws the face and hands of a clock in a Minecraft world. The Minecraft API comes with neat functions such as drawCircle, and drawLine, so making a real clock face is as simple as getting the system time and doing a bit of trig.
After the break you can check out [Martin]’s Minecraft clock in action. If you’re running the Pi version of Minecraft, you can also get this running on your machine with the code on [Martin]’s git.
[youtube=http://www.youtube.com/watch?v=ey4QpoqZLLU&w=580]
Thanks for posting about my clock. Not wishing to take anything away from mojang, but they dont supply functions to draw a circle or a line, i had to make them myself, although now i have, anyone can use them, got to love open source!
Martin
It’s a shame my Pi simply says something about invalid vichq, when I run MC.
Hmm… I also tried it using putty and Xming. And it gave me an error message as well:
pi@raspberrypi ~/picraft/mcpi $ ./minecraft-pi
vchiq_lib: Incompatible VCHIQ library – driver version 2 (min 2), library version 6 (min 3)
* failed to open vchiq instance
pi@raspberrypi ~/picraft/mcpi $
I did notice that there is a new download of Raspbian “wheezy” from the 2013-02-09 on the RPi site. So I’m thinking that i either need to setup a new SD card with this or else that picraft is intentionally limited to only work with the local display output and that it will not work with a remote X servers.
The fix I saw is:
sudo chmod 777 /dev/vchiq
Still doesn’t seem to work with ssh -X though, I just get a black screen with both putty/xming and in ubuntu.
I think your probably need to install vnc or something like that to really play it remotely.
To update this: It appears that minecraft won’t render over VNC either. You need to have a physical monitor connected. You should still be able to use the API from a remote connection, however.
Having worked with building mods and plugins for things like Bukkit, this seems way too easy. I haven’t used a Mojang-official API yet, but if this exists for proper PC Minecraft I shall have to give it a try.
There is a plug-in for Bukkit called RaspberryJuice that is supposed to do just that.
Here’s an article showing how to run the scripts (including those on mcpipy.com) using a Bukkit Server and the RaspberryJuice plug-in — it works great!
http://mcpipy.wordpress.com/2013/02/13/running-python-programs-without-a-raspberry-pi/