Will (some flavor of) Raspberry Pi work here?
November 27, 2015 9:44 AM   Subscribe

I've got a friend's kid who's into computer gaming. Should he get a RaspPi, and if so what kind?

He minecrafts away on his family Mac and we've been tweaking some stuff I've written in Python + pyglet (a python framework around OpenGL) and he really liked it. I also helped him install Linux on an old Dell and he likes the idea of hacking the command line. But the linux box is just too old and slow to do much, and the Mac can be a pain installing packages on, especially as he doesn't have Admin rights (his father's no fool.) Is there level of RaspPi that could meet his needs? (I get the impression that Arduino and BeagleBone are more pointed for creating controllers, but maybe one of those would work better instead? RaspPi does seem to be the new hotness, which would count with this kid, but that's not the most important factor.)

I'm guessing the biggest issue would be the video driver. OpenGL offloads most of the processing onto the GPU so I'm guessing you'd need a middling-powerful video driver to handle a screen in the 1280x1024 range with a reasonable level of OpenGL support. I'm assuming the necessary storage and USB connections for keyboard, mouse, and gamepad are easily available on some version, and I'm not sure how much processing power would be needed for something like this — I've never worked with anything less powerful than the latest Intel hotness myself. Does anybody have any recommendations?
posted by benito.strauss to Computers & Internet (14 answers total) 5 users marked this as a favorite
 
The new Pi Zero is available now - being given away with issue #40 of the MagPi (official Raspberry Pi) magazine. If you can find a copy, this is a no-brainer. Just as powerful as the original, but 1/3 the size.

Worth mentioning that of course there are necessary bits & bobs you need to really make it do stuff, but free is a good place to start.
posted by Emperor SnooKloze at 10:20 AM on November 27, 2015 [1 favorite]


Response by poster: Yeah, I forgot to mention that I posted this question based on the FPP about the Pi Zero.

I find it hard to believe that the GPU on the Pi Zero can drive OpenGl at the resolution we'd want. But I'm constantly being surprised these days by the amount of power that comes in small packages. Or is there a specific bitty bob add-on that can do it? I really don't know the basics.
posted by benito.strauss at 10:29 AM on November 27, 2015


I'm not sure I entirely understand your question, since I'm not into gaming. But there's a pi version of minecraft that comes bundled with Raspian (see here for details). You might try looking at the Raspberry Pi forums for an answer if nobody here comes through.
posted by sevenyearlurk at 10:54 AM on November 27, 2015 [1 favorite]


Best answer: I'm not a Pi user, but my understanding is that it includes an on-die GPU that is capable of supporting OpenGL ES 2.0 (more similar to a mobile phone than a desktop machine). GLES 2 has a relatively large feature-set though, and so long as you don't want to get super-high-detail or super-fancy you should be able to do some things with it. The good/bad news is that to get good results you'll probably have to think a lot about optimization (minimizing draw calls, using texture memory efficiently, etc). Bad news if you want quick results; good news if you want your pupil here to have to learn about efficient graphics pipeline stuff. I'm fascinated by it, but I realize I'm an outlier.
posted by Alterscape at 11:26 AM on November 27, 2015 [2 favorites]


it's not clear to me what you want, but i think you're asking if a pi is more powerful than your old linux machine. if anyone is going to answer that you'll need to give the specs for that machine. but this blog post shows that an old pentium 4 kicks the everliving daylights out of a pi for cpu tasks. i guess it's possible that the gpu is better than the equivalent gpu, but i don't see anything that says linux on a pi would be faster than on a p4 + similar generation gpu.
posted by andrewcooke at 11:57 AM on November 27, 2015 [2 favorites]


I don't do gaming stuff, but it seems unlikely that a Pi would be faster than whatever he's using right now.

They excel at limited purpose devices, and at size and affordability, though, so if he is interested in learning how computers work and stuff, yes, he should get one.

However, I have a Pi I'd intended to give to a kid (I think he was 11 at the time) who was into Minecraft and said he was interested in learning more about computers, but he couldn't even sit still for the setup. He's a kid and was just used to have things that worked out of the box.

As such, I'd suggest maybe getting him a Pi Zero if you can get your hands on one just to gauge his real interest.
posted by ernielundquist at 12:19 PM on November 27, 2015 [2 favorites]


What do you actually want to do with this machine? What are your goals? What are his goals?
posted by demiurge at 12:43 PM on November 27, 2015


Best answer: It sounds to me like your focus is mainly desktop-computing style tasks and light gaming, which the Pi does competently, but not that great. Raspberry Pi and similar boards like the Beaglebone really shine when you want to fit a basic and low power Linux computer somewhere, or work with GPIO from inside an operating system instead of a simple loop (like with an Arduino). That can be great fun, but it's not what you described. Also remember you're going to need an SD card, a power source, adapter cables for the Pi Zero, and at least some means of interfacing with the Pi. (a monitor, mouse, and keyboard, or at least a serial interface cable) Unless your friend has those lying around, count on the Pi ultimately costing you $30-70.

Minecraft and a few other games have Raspberry Pi builds, but they're not very common. While the Pi has a pretty decent GPU for the price, the CPU is pretty slow. The original Raspberry Pi (based on the same chip as the Pi Zero) was compared to a Pentium 2 desktop with the original Xbox's GPU. Worse, the original Pi used a fairly antiquated set of ARM instructions, so even projects with ARM builds often wouldn't run without someone building a new set of binaries from source. For example, Processing only recently came out with an official build for the Raspberry Pi even though it's been out for years and Processing is explicitly intended to be an educational programming language.

For your goals, I think you'd be best served by an inexpensive x86/x86-64 machine. It's still the most supported architecture by the open source community. Look into Intel NUC computers. These are very small and cheap computers designed to work as light workstations or home theater computers. They come in a variety of speeds and are on their sixth generation now, but even a low-end one will blow the Pi out of the water. Or watch Ebay, Craigslist, and manufacturers' outlet sites. I'm typing this right now on a surplus Lenovo ThinkPad I scored for $140 from a Missouri school district on Ebay.
posted by mccarty.tim at 1:37 PM on November 27, 2015 [5 favorites]


Best answer: I just researched this (before the Pi Zero announcement) for my sister who was thinking about getting one for my teenage nephew. If you’re going to do it, get the Pi 2, which has a quad-core processor, more RAM, and more USB ports. The price difference between the basic boards is so small i can’t see any good reason not to go for the most-capable model available. The blog post andrewcooke linked to was for the original Pi so i’d expect much better performance from the Pi 2. The old Dell might still be faster. The hard part was deciding where to buy it from and which bundle. I ended up recommending this CanaKit Raspberry Pi 2 Complete Starter Kit with WiFi.

However, I have a Pi I'd intended to give to a kid (I think he was 11 at the time) who was into Minecraft and said he was interested in learning more about computers, but he couldn't even sit still for the setup. He's a kid and was just used to have things that worked out of the box.

Yeah, this is so dependent on knowing the kid. In my case i know he’d be fine with it (he’s sixteen and already programming in real languages on his own). The trouble was getting through her head that figuring out how to get it running was part of the experience. She kept going “I want him to be able to play with it on Christmas Day.” (Gah!) He lives in a different state with his dad and will just be visiting for the holiday. I knew he’d likely have no problem finding a USB keyboard and mouse at home and even if he needed to buy a cheap mouse or keyboard it would be better to let him decide what he wanted to buy. (Again, part of the experience.) I think in the end she decided against getting one at all. Since he had never expressed any interest in one and has plenty of expensive computers at home (dad is rich) i thought this was fine.
posted by D.C. at 1:37 PM on November 27, 2015 [2 favorites]


Response by poster: Sorry for the confusion; I threw in details to illustrate his interest and why we were considering a RaspPi and they muddied the waters.

If I can restate the question, "Is there a version of RaspPi that can run Python+Pyglet well enough to support simple game programming? What version and what add-ons should we be looking at?"

Alterscape's answer is the kind of details I'm looking for, and makes me think it might be worth it. We're talking very un-complicated games: cookie clickers, 2-d scrollers, asteroids, that kind of thing. Just a bunch of sprites that are rotated, scaled, and opaqued, no custom shaders. It also seems like Pyglet handles a lot of re-using textures and batching draws for you, but even if we have to keep the object count low it will still be interesting.

As for his level of interest it's pretty high (and I'm a bit surprised). He enjoyed installing Linux with me, and yesterday he told me he's started writing his own 2-d scroller, seemed to be interested in a discussion of how event driven vs. polled keyboard handling worked, and he's the one who said to me "I'm thinking whether I should get a Raspberry Pi".
posted by benito.strauss at 1:46 PM on November 27, 2015


Response by poster: Okay, having read your comments it looks like the RaspPi is not what we're looking for. I might get that CanaKit for my own playing around with, D.C. — it looks like a good starter at a good price. I'm also glad to be warned about the difficulty with packages. We keep running up against trouble installing stuff (I know my way around Windows, but the kid's family is a Mac family and it's a pain.) If Raspberry's Linux doesn't give me the apt-get goodness I'm used to from Debian there's even less motivation to try it. Thanks everyone.
posted by benito.strauss at 2:10 PM on November 27, 2015


I'd agree with mccarty.tim that a NUC or some kind of barebones PC or ex-lease laptop is going to cause less frustration, but if you are going to get a Pi, then the Pi 2 is going to have fewer choke points.
posted by holgate at 2:12 PM on November 27, 2015 [1 favorite]


Best answer: If Raspberry's Linux doesn't give me the apt-get goodness I'm used to from Debian there's even less motivation to try it. Thanks everyone.

Raspbian is basically an unofficial third-party riff on Debian with a custom kernel / bootloader and some particular configuration choices. It tends to be a pretty stale Debian—they finally got around to releasing a Jessie-based version a couple months ago—but package management is basically what you're used to.

If I can restate the question, "Is there a version of RaspPi that can run Python+Pyglet well enough to support simple game programming? What version and what add-ons should we be looking at?"

Yeah, absolutely. Well - I haven't used Pyglet, but it probably works, and there're plenty of options for simple game stuff in Python and other languages. Don't go any further down the scale than a Pi 2 - you'll want the CPU there.

One strong suggestion - set it up with a hard drive for the primary filesystem if you don't want to deal with corrupted SD card filesystems all the time. It's also something of a speed boost. I wrote a tutorial and a helper script for doing this a while back. Makes all the difference between it being a long-term reliable machine or not.

In general, factor in: Decent keyboard and mouse, a case, HDMI monitor, couple of SD cards (faster helps), external drive, powered USB hub, and maybe a wifi dongle. Good starter packs will probably have a lot of that stuff, minus the hub and drive.

When you add it all up, you might find that mccarty.tim's suggestion of a low-end x86 box is way more bang for the buck, but your use-case is basically what the Pi is designed for, so it's not a crazy idea or anything. I've spent a lot of time supporting this machine and doing projects with it, and I've come to really dislike any number of things about it, but it's also a well-supported device with a big community and does seem to be an inviting environment for kids to play around with programmery stuff in. I think there's a lot to be said for giving new programmers a resource-constrained environment to explore.
posted by brennen at 3:30 PM on November 27, 2015 [2 favorites]


Response by poster: As a follow-up, I managed to snag a Pi Zero for $5, so I will use that to get some experience and collect the supporting equipment (cables, SD cards, etc.) required, but I'll get a 2 Model B for this project. Even if I end up needing an NUC to make this work I think the experience with the RaspPi will be useful. Thanks to everyone for their responses.
posted by benito.strauss at 9:30 PM on December 27, 2015


« Older Possibly fradulent debt collector calling my...   |   Webpage to display two random photos upon each... Newer »
This thread is closed to new comments.