Sunday 25 November 2012

Minecraft is coming to Raspberry Pi! (With FAQ!)


Yes, Minecraft really is coming to the Raspberry Pi! Ever since the Pi was announced I am fairly sure that one of the most frequently asked questions on the forums has been whether or not it will be able to run Minecraft. There have been numerous attempts to get it running, with oodles of threads created over in the forum.

People have had some success getting the server running, but as far as I am aware running Minecraft itselt has remained frustratingly out of reach. People have suggested porting other similar software (like Minetest) and one enterprising father and son combination has even created their own clone called Blocky which is well worth checking out!

But yesterday changed EVERYTHING, with an official announcement from Mojang that they were bringing Minecraft to Raspberry Pi by porting Minecraft Pocket Edition. This has obviously led to a flurry of interest and excitement in both the Minecraft and Raspberry Pi communities with loads of questions flying back and forth. In order to attempt to answer some of these, allow me to present the Minecraft Pi Edition FAQ!

Minecraft Pi Edition FAQ

What is Minecraft?

Minecraft is a sandbox construction game where you can build anything you can imagine. It also has scary monsters, like creepers who tend to want to destroy what you have built.

If you want to know more, just go to YouTube and type in Minecraft!

Source: http://www.mojang.com/games/

What is Minecraft Pi Edition?

Minecraft Pi Edition is a version of Minecraft: Pocket Edition that comes with a revised feature set and support for multiple programming languages.

Source: http://www.mojang.com/2012/11/minecraft-is-coming-to-the-raspberry-pi/

What is Minecraft Pocket Edition?

Minecraft Pocket Edition is a cut-down version of Minecraft for Android and iOS devices.

The current version of the software concentrates on the creative building and the primitive survival aspect of the game, and does not contain all the features of the PC and Xbox 360 releases. The current release allows for multiplayer across a local wireless network.

Source: http://en.wikipedia.org/wiki/Minecraft#Minecraft.C2.A0.E2.80.93_Pocket_Edition

How much will it cost?

Nothing. Zilch. Nada. Zero.

Source: http://www.mojang.com/2012/11/minecraft-is-coming-to-the-raspberry-pi/

Will it have multiplayer?

Unclear at present, although the following comment in the original post on Mojang's website suggest that it will have LAN multiplayer:

"You could organise the cheapest LAN party of all time..."

It's worth noting that the current version of Pocket Edition does support multiplayer across a local wireless network.

Source: http://www.mojang.com/2012/11/minecraft-is-coming-to-the-raspberry-pi/

What will I be able to do with it?

The possibilities are massive. You could organise the cheapest LAN party of all time, or use the Pi to learn the fundamentals of programming on a miniscule budget. It’s like hacking your way into Minecraft and modifying the game world with code, a bit like being Notch, Jeb, or Nathan, but arguably more fun and less stressful.

You can start by building structures in the traditional Minecraft way, but once you’ve got to grips with the in-game features, there’s opportunity to break open the code and use programming language to manipulate things in the game world. You’ll be learning new skills through Minecraft.

Source: http://www.mojang.com/2012/11/minecraft-is-coming-to-the-raspberry-pi/

What programming languages will I be able to use?

Not known at present, as soon as more details are available I will update this!

Where can I see it in action?

You can see it in action here!

Source: http://www.raspberrypi.org/archives/2603

When will it be released?

"Soon" is all we know at present. The announcement was made on 24 November 2012, and was described as "available to download soon" but specific timescales are not yet known.

Source: http://www.mojang.com/2012/11/minecraft-is-coming-to-the-raspberry-pi/

Will there be server software?

Not known at present, as soon as more details are available I will update this!

How are they doing 3D in an X Window?

From Daniel Frisk on Twitter: "actually, it's "fake". We check if the win dimensions has changed and if so recreate the glucontext"

Source: http://twitter.com/danfrisk

I thought Minecraft needed lots of memory? Will I need the 512Mb version of the Raspberry Pi?

Daniel Frisk has said "we'll try to at least run it on the 256"

(It's worth mentioning that my son has an Archos 101 Android tablet that has 256Mb of RAM and that can run Minecraft Pocket Edition. However that's obviously no guarantee that the Pi Edition will also work in 256Mb of RAM.)

Sunday 27 May 2012

HDMI to VGA for Pi

The 19" TV in my study only has one HDMI port. To be fair, this is not uncommon on a screen of this size, but it did mean faffing about with a HDMI switch if I wanted to connect my Pi.

Fortunately someone over on the official Rasberry Pi forums found this at Amazon:


I decided to grab one and had been using it quite happily until today...

It seems that the HDMI-to-VGA cable I have (the Amazon neewer one) draws some power from my Pi. Presumably it needs some to make the chip work that converts the signal. I've no idea how much exactly, but it might explain some of the power problems I've been having!

I played with Debian a lot yesterday, fiddling about with configurations and trying various games (Scummvm, Doom, Quake 3, Pingus) all without any issues.

Today I decided to try out OpenELEC and kept having problems with the screen on my monitor blanking out for a second or so and then coming back. Very annoying. I tried switching to a normal HDMI cable and the problem went away, so I concluded that it must be this cable drawing power from my Pi.

Now as I was saying, I was having some power problems previously, even with a genuine Samsung Galaxy S II charger, which I think without checking provides 700ma. That prompted me to switch to a powered USB hub, with the mouse and keyboard plugged into that on two ports and a third port providing power back to the Pi, leaving a fourth port spare.

Having reached the end of my tether with the screen blanking out this evening I considered not running the Pi from the USB hub and instead using the Samsung charger JUST for the Pi and the powered hub for everything else. I decided I didn't really want to do this as it meant having two separate devices plugged in to use my Pi and I was already a bit annoyed at having to use a powered hub.

Then I remembered that I have some 2.5" hard drive enclosures that come with Y-USB cables. The idea is that you plug both USB plugs in and one provides power and data connection and the second just provides additional power for more hungry drives. As I don't actually own a drive that's ever needed this second connector plugged in I decided I could sacrifice one of these cables.

A quick Google search showed that I would still only get 5v of power on the cable (I was initially concerned I would get 10v and blow my Pi!) but estimates on amps varied between 600 to 1000 ma.

I decided to go for it and grabbed a spare micro USB cable and one of these Y-USB cables and got busy. I didn't bother connecting the data wires as this is purely intended for powering the Pi, just connected the red/black wires.

Plugged it in, turned it on and it works perfectly, the screen blanking is gone!

Hopefully this might help out someone else when they're having a frustrating day...

EDIT: Forgot to mention that I initially had some problems in OpenELEC that I didn't have in Debian with what I can only describe as "sparkly bits" on certain screens. This is easily fixed by following instructions here:

http://elinux.org/R-Pi_Troubleshooting#Interference_visible_on_a_HDMI_or_DVI_monitor

Sunday 20 May 2012

OpenTTD

Have spent part of my day learning how to play OpenTTD, having NEVER played a Transport Tycoon game before. My curiosity was piqued having heard of efforts to port this to the Pi. You can read more about that here:

http://blogs.arcsoftwareconsultancy.com/pi/2012/05/01/open-transport-tycoon/
http://blogs.arcsoftwareconsultancy.com/pi/2012/05/14/update-on-openttd/

If you're like me and have never played this game before, check it out here:

http://www.openttd.org/en/

Needless to say, it's a great little game and I'm looking forward to seeing a fully working (and hopefully optimised) version of it running on my Pi.

Distro Issues

Spent a frustrating morning trying to get the recently released Slackware distribution running on my Pi. I have no doubt that it will be great when problems are ironed out and I have nothing but praise and admiration for the person (or persons) responsible for porting it to the Pi, but it's just not ready for prime-time yet.

The main two problems I encountered were that I could not get my network connection working and I was experiencing lots of problems using my wireless mouse/keyboard.

Now the first of these problems may be down to my lack of Linux knowledge, but after numerous Google searches and checking of files, running of ifconfig and netconfig I was still getting no nearer to getting it working.

The second problem, with my wireless mouse/keyboard exhibited as lots of lag between keypresses or repeating my keypresses or just not picking up on them. This was a problem I had seen previously on Debian which turned out to be down to my power supply. I've since replaced that (now using a powered USB hub) and they are working perfectly in Debian. I wonder if Slackware is using more power than Debian and therefore affecting the mouse/keyboard and potentially the ethernet too?

If you want to try it for yourself, you can pick it up here:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=56&t=6132

Anyway, back to Debian I went and decided to get the problems with the display sorted out. Here I had two problems, text was too small so as to be virtually unreadable and I had fat black borders at the top and bottom of the screen.

Now I am sure the small text is perfect if you are on a 32" or 37" or 40" (or even bigger) screen, but at present my Pi is hooked up to a 19" screen, so I needed to find out how I changed the resolution.

I referred to the following two pages:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=2&t=3042

http://elinux.org/R-Pi_ConfigurationFile

These (particularly the first link) should tell you EVERYTHING you need to know about the config.txt file. I set hdmi_mode=4 and then after a bit of trial and error I got the overscan settings perfect.

Next up, installing Chromium using the instructions here:

http://myraspberrypiexperience.blogspot.co.uk/p/chromium-browser.html

Friday 18 May 2012

Battery Power

One thing my son and I were interested in was powering a Raspberry Pi from batteries. At present we have no specific application for this, but obviously if it can be done it opens up a world of opportunities for a portable Pi!

To this end I popped into my local Maplin store on my way home and picked up a 4xAA Battery Box (Code HF29 - £1.29) and a PP3 Clip (Code HF28 - £1.19) to go with a micro USB cable I picked up at Poundland earlier in the week.

I snipped the USB plug (the big one, not the micro one!) from the end of the cable and stripped back some insulation. I then snipped the yellow and white wires off and connected the red and black wires to the same colours on the PP3 cable. This then clipped onto the battery box which by now was filled with batteries, ready to rock.

We connected up the Pi and it came to life! Booted OpenELEC and started a video playing, all without problems. Very pleased.

We might make a further trip back to Maplin this weekend to pick up a switch and some rechargeable batteries, I'll keep you posted!

EDIT: Tweeted about the above, and the Raspberry Pi people dropped me a tweet back to say "awesome - but be aware that if you push more than 5v through you may shorten the lifetime if the chip. 5v linear regulator FTW!" Hmmm... obviously this isn't quite as simple as I thought and a bit more work is required! In short, don't follow my instructions above for now, will update when I come up with a better solution.

Saturday 12 May 2012

Raspberry Pi

I finally got my hands on a Pi on Thursday, 10/05/12. Sadly (for me) I had already promised the first Pi we received to my 10 year old son, so I had to hand it over. I'd been following the Pi since it's first appearance on the BBC website. I'd got my son interested and had promised him one for Christmas last year. Sadly due to various delays they weren't available anything like early enough for Christmas so he got an IOU and the aforementioned promise that the first Raspberry Pi I got hold of would be his.

Fortunately for me, while he's quite techy, he's not as techy as me so I've been able to play around with it a fair bit over the last couple of days. I've been darting in and out of his bedroom with different SD cards and scribbled notes like a madman! After getting Debian up and running (simplicity itself, just download and follow the instructions on the website) we wanted to get Quake 3 running. I found some very useful instructions here and soon had everything downloaded and copied across. Sadly loading up the game would cause the Pi to freeze up.

We tried various combinations of USB hubs, mice, keyboards, even a different SD card, but to no avail. I decided to move onto trying something else and got busy with OpenELEC! I've been using XBMC in various forms for about a year and a half now and fully intend to have at least one (if not several once they become easier to get hold of) Raspberry Pi dedicated to running XBMC. I was hoping the process of setting it up would be as easy as that for Debian, but no joy. I would have to download the sources and compile it myself!

Fortunately some great instructions were available here on the OpenELEC website to get me going. I grabbed a spare laptop (no DVD drive or battery, hence why it's a spare!) and installed Ubuntu 12.04 as I would need a flavour of Linux on hand to compile and didn't want to tie up my own laptop (also running Ubuntu 12.04) all day. I then ran through the instructions and left it to build. And build. And build.

And build.

Finally about 4pm it finished (I had started at around 9am) and I then used the second part of the instructions to get it onto an SD card. Booted up the Pi with the new SD card and it all looked great! Sadly it was frozen, more problems!

It was about this time when I decided that maybe the PSU I had purchased was no good. It was a plug with a USB port that is *supposed* to provide 5v at 1000Ma. So I pulled the USB cable from the bottom and shoved it into the next nearest thing... the front of my son's XBox 360! Pi booted up and worked like a charm, lovely!

(For reference, the 360 doesn't even need to be switched on for this!)

I've still run into a few power-related issues, so I don't think this is a permanent solution and am on the look out for a powered USB hub or two now. Still, it was fun to get these things set up and I've definitely learnt a few new things. Just wondering what I'm going to do next...