What kind of games are battery powered?
Well, one kind is the kind that Robert Green makes at his company, Battery Powered Games: the kind that run on Android devices. (It was tempting to write “cell phones” but that isn’t entirely accurate. More than one class of device runs Android.)
Aren’t sure what Android is? It’s an operating system based on the Linux kernel that powers devices like Google’s Nexus One and Motorola’s Droid. And it’s the operating system Robert Green has chosen to write games for.
Programmer who games or gamer who programs?
When asked whether he was a programmer interested in games or a gamer interested in programming, he thought about it a moment and decided that he is a programmer interested in games. (It was a close call. Robert got introduced to Nintendo when he was six and programming when he was seven. Now 29, he claims he’s only been good at programming for the last eight years or so. He is not yet comfortable claiming he’s good at games.)
The programming Green got really good at is Java. Which partly explains the choice of Android. Android understands Java. And then things get complicated.
“When it comes to making games using Android, it’s hard to know where to look for examples,” says Green. “Where is the code to give you some idea how to make it work?”
First copy, then write…
Programmers have a long tradition of learning code by copying simple applications. A familiar exercise is finding out what must be done in a given language to produce the phrase “Hello, world” on a screen. It’s great to see it work and it provides insight into how the code is doing what it’s doing. And you change it to do something else, and change it again, and before you know it, all the original code is gone and you’ve got something totally new. Of course, finding the example code when the operating system is new is a challenge.
“(Battery Powered Games‘) Light Racer started with sample code from an Android game called Snake. Just to see how they did it. We used it like a scaffold. Of course, as we got further into the code, we kept changing things until, by the time we finished, there was nothing left of the original Snake code.”
Light Racer is a tip of the hat to the lightcycle race in TRON with light barriers streaming out behind the cycles as they cross the grid. The idea, of course, is to trap your opponent with one of your walls. Or trick him into running into one of his own walls.
The controls of Light Racer, as one would expect of game that can be played on a phone, are minimal: Touch or tilt or touch and tilt. Not hard to remember but not likely to easily produce complex movement, either.
Android wish list
“That’s one of the things I’d like to see added to Android,” says Green. “Not being able to do multi-touch is a real constraint.”
Any other real constraints to those who take up game-making for Android?
“Oh, not having floating point processing is kind of a pain. And not knowing what kind of GPU (Graphics Processing Unit), if any, a device has can be a problem.”
To address the GPU issue, Battery Powered Games has asked for donations of Android devices as test beds for new games.
“We’re trying very hard to make sure that every game we publish is bug-free and working optimally on every Android device. Unfortunately, there are many different devices out now and each one is quite expensive without a 2 year contract. We test on what we can but we’re currently in need of the following devices:
Sony XPERIA X10
Low Priority (but still useful):
HTC Droid Eris (Verizon)
HTC Hero (Sprint Hero)
HTC Magic (T-Mobile MyTouch)”
This reminded me of the situation not so long ago with PC video cards before standards firmed up. In reloading an aging arcade favorite, Ultim@te Race Pro, I came across a README file that contained the following sage advice:
1. If the following message appears when Ultim@te Race Pro
starts, “_GlideInitEnvironment: glide2x.dll expected
Voodoo Graphics, none detected,” this problem is usually
caused by having installed the Glide drivers for a 3Dfx
accelerator card and no longer having the 3Dfx card
installed. To remove the Glide drivers, please click
on the Start menu and select Find>Files or Folders.
Then type “glide*.*” in the Named field and click the
Find Now button. Press Ctrl-A to select all the files
and then press the Delete key. You can also rename the
files if you need them for later use.
2. Before running Ultim@te Race Pro, owners of Creative
Labs 3-D Blaster VooDoo2 cards will need to download
the latest drivers from the Creative Labs Web site at
3. The nVIDIA Riva 128 Multimedia 3-D Accelerator card
does not support T-Junctions, which can cause graphic
corruptions in many 3-D games such as Ultim@te Race Pro.
For customer support, contact nVIDIA.
4. If you start a race with the graphics option “DirectX
Acceleration” selected and the screen is either blank or
severely corrupted, return to the Windows 95 Desktop and
check your Display Properties by right-clicking on your
Windows desktop and selecting “Properties” from the
menu. Select Settings>Advanced Properties>Adapter. Then
choose “Adapter default” for the “Refresh rate.”
If the display properties are already set to these settings
or if the “Adapter default” option does not exist under your
display properties, then you need the latest drivers
for your video card. You can download drivers from the
Internet at your card manufacturer’s Web site, or you
can contact your card manufacturer’s customer support line.
Reference drivers for some cards, like the Creative Labs
Graphics Blaster 3-D, can be found at www.rendition.com.
Weren’t those days (~1999) fun? Now consider what it must be like to design games that will run on devices where the owners have no clue what sort of GPU they might have and there is no way, short of actually handling the device, of finding out.
Think small…very small
Oh, and one other thing. There is a size constraint on Android games. Best not to let them get any bigger than 3MB.
A whole game. Graphics, game engine, sound effects, music. 3MB.
“It’s all about efficiency,” says Green.”First you have to get code that works. Then you have to get code that works well. We had some 3D modeler code that took three hundred milliseconds to do a specific action. By the time we were done rewriting it, it took 1.5 milliseconds. With that level of efficiency, we could have twenty fully modeled characters on the screen at once.”
Of course, assembling the cast of 20 characters, impressive as it is, is not the same as giving gamers an engaging experience. Which led naturally to the next question: What games has Green played that really delivered an engaging experience?
A few moments thought and Green offered the following list:
“Super Metroid is probably the greatest 2D platformer. Chrono Trigger had a good story. Made you want to play it.”
Can a game achieve the status of art? More thought.
“Shadow of the Colossus is a masterpiece. And that’s not the only one. Many games spark an emotional response. They engage you on much more than a just a mechanical level.”
When asked about the mechanics of engagement — how a game draws a player in — Green says he’s not interested in games with steep learning curves.
“There’s a fine line. It’s great to be able to pick up a game and just get it.”
And when it takes a little longer?
“If you can make the gamer feel it’s worth it, sure. Dune II, for example.”
Green personal favorite at the moment is Gem Miner, an Android device game.
“I play it to relax at the end of the day. And just when I think I’m done, I’ll decide to play just another few minutes.”