handcircus

Archive for November, 2007

iPhone dev

Tuesday, November 20th, 2007

After an insane amount of headbanging I’ve finally managed to get a working toolchain up and running, compiled, deployed and run a game on my iPhone. The Jailbreaking part wasn’t too hard (just followed the instructions in the Jailbreak 1.1.2 package), but getting the compiler, libraries and paths set-up was a complete nightmare. (Those of you thinking about doing the same under Leopard, just follow the instructions here and make sure you set up your .arm-cc-specs file).

So, is it any good? Yes! Having played with Installer.app and a few of the recently released packages, theres already a ton of good stuff out there. I was a bit disappointed with the speed of NES.app but the ScummVM port runs beautifully (and is perfectly suited to the screen/interface). Theres a pretty nifty version of solitaire.

In terms of picking apart source (is there a better way to learn?) the first thing I dug around was Bounce by CeD (source code here). This led on to a real seam of practical learning bits, using a lot of the different aspects of the device (including multi-touch, tilting), at the iApp-a-Day page (all of the code for each application is available here).

It looks like a pretty good development environment. UI bits and pieces are handled by UIKit, and you have a reasonable graphics library with CoreGraphics for blitting, bitmap manipulation. Not had a play with any of the OpenGL|ES stuff yet. I’ve got a few ideas I’d like to work up, but will probably spend a little while getting to grips with Objective-C and the libraries first. What fun!

Update: Theres an ideal OpenGL example here by Andrew Willmott. Shows how to render an OpenGL scene within a normal Application.

Who’s afraid of the iPhone

Friday, November 16th, 2007

iphone.jpegSo, I got an iPhone on Monday. I wasn’t one of the rabid queuers on Regent Street, but picked one up Monday morning at a regular Carphone Warehouse. I’m not going to waste precious finger-tapping (and eyeball scanning) by inflating the bloated media-blimp that is iPhone coverage on the internet, but suffice to say it’s a beautifully crafted (albeit slightly flawed) device that does a few targeted activities particularly well (maps, media, email, phone, web browsing).

But, as a device with potential its really quite absurd. I’m definitely interested in the dev side of things – and seeing how people have got a few emulators, games and tools running pretty quickly, I got digging around looking to see what the state of development was, and what libraries are available.

Apple have announced that there will be an SDK available in February, but people have already taken the steps of creating their own toolchain with the ability to link to Apple’s frameworks.

One thing that I wasn’t previously aware of was that the iPhone has a 3D graphics processor embedded, the PowerVR MBX – which explains the smooth transitions for effects such as cover flow (without the nasty aliasing you get on the new iPod nanos). It also includes the OpenGL|ES framework (the baby brother of OpenGL).

Obviously,one of the first thing that struck me about all this is the huge potential for games. We’re starting to see a few original games released to take advantage of the hardware, such as Labyrinth which uses the tilt functionality as well as hardware rendering via OpenGL. Lets take a look though at what the iPhone/iPod touch has to offer, and why it could be a real contender in the games market.

Graphic display
Big, high-res (480×360 – compared with 480×272 for the PSP and 2x 256 x 192 for the DS)

Interaction
Multitouch touchscreen and tilt sensors (versus 50% touchscreen and standard buttons for DS, analogue stick and buttons for PSP). The iPhone also has a microphone and camera.

Connectivity
54mbps Wi-fi, backed up with EDGE/GPRS and Bluetooth on the iPhone (versus 11mbps on the PSP/DS)

3D acceleration
Not sure how it compares in terms of power with the DS/PSP though, but sure its not too dire.

Distribution channels
Potential support via iTunes – also has a built in browser which could potentially allow you to browse and download games directly from the internet. (versus traditional retail distribution for DS/PSP, fledgling downloadable games market for PSP). Installer.app already does this.

Open platform and development
How open is yet to be established, but I imagine that you will get access to a large chunk of the phone/ipods features, just maybe cutting off enough so that you can’t create Skype-like apps. Compare this to the officially closed platforms of the DS and PSP. While the mac has a very low-key games development scene, larger players like EA and Harmonix are starting to work on original iPod games – you can bet that they are already working on some titles for the iPhone.

All the homebrew dev seems not far off OSX development, using Objective-C, C, C++. I imagine that XCode integration will come with the SDK

Storage
With a guarantee of 4Gb/8Gb/16Gb storage on the device, you have enough room to store a LOT of games or game data. With a lot of DS roms weighing in at 64Mb/128Mb theres enough storage space to satisfy a lot of applications.

Obviously specs are one thing, but imagine some of the potential games that could be developed:

  • A high res, fully touch screen electroplankton with poking, pinching dragging and the ability to use all of our music collection from your iPod and ability to upload and share songs you create over the internet.
  • A tiltable locoroco game.
  • Brain training on the iPhone/iPod touch would work perfectly.
  • A Habbo Hotel client wherever you are.

But I think most of all the reason it will work well is because people will buy it anyway - there is the potential for many millions of these units to be bought, and without Apple even MENTIONING games. Its not yet being pitched as a contender in any way, but they could easily turn round in February and announce an incredible line-up from EA, Ubisoft, Harmonix. It almost seems like a stealth move, as this has the potential to be the greatest handheld gaming device on the market. To be honest, I’m glad they haven’t gone down the N-Gage route of touting gaming as a major feature - consumers of any games on the device are likely to be very much casual gamers, and shifting the focus from the core features of phone/ipod/web would likely reduce its appeal to the people that they are trying to sell to.

Whatever happens, I think next year could be very interesting for this device.

Bioshock

Friday, November 2nd, 2007

bioshock_art_01.jpgI finished Bioshock Halloween evening (only after carving my first Jack-O-Lantern and dodging neighbourhood sweet-guzzlers, satisfied that my cliche conformance for the year was on schedule), having played it on-and-off for a couple of months. Obviously its been a much-discussed title, but why not chuck in a few pence worth of comments?

First up, the story. This is fresh - great setting (50’s nostalgia, under the sea, filled with umm… mutants?), great premise, excellent twists, well-fleshed out characters. In some sections the sense of wonder and suspense and really well-built up, avoiding the “who cares” attitude provoked in the majority of in-game chest-puffing storylines (looking at you Halo). It is also genuinely scary in sections - visually theres some genius set-pieces and the audio is particularly disturbing. Late night play did develop bizarre dreams and restless sleep. Thankfully, for such a story-led game theres little in terms of cut-scenes, most of the story is disseminated by audio commentary that you pick up around the environment. Good, but valves story exposition works better in my opinion. I found listening to the audio a bit of a chore by the end and there was very little indication as to whether the audio would contain a bit of fluff (someone talking about going to the shops perhaps) or a genuine bit of story-critical exposition.

Art direction is beautiful. The world is exquisitely rendered and its taken a source of reference that has been utterly neglected, plus invented some iconic characters and locations. Top marks.

But, strip away the story and the visuals and you are left with a fairly standard game design. To be honest its dated. Given how many years its been in development, its understandable why the standards of the time have been used as the water-mark onto the project. It consists of fairly mundane FPS fare - move into a room, shoot all the creatures, move into the next room, shoot all the creatures. Some creatures suprise you. You kill them, you move through to the next level, a new creature is introduced, etc. The celebrated difference in this case - Plasmids (the ability to manipulate your DNA to grant new skills) - is certainly interesting, but in most cases is used as a lock/key condition to progress through the game, or to simply incapacitate some of the bad guys. Some of the more interesting elements are the ability to turn creatures on each other, or to get security cameras to get bots to attack them, but its really not enough to make a difference.

Other design decisions are a bit bizarre. “Hacking” involves replaying the 80s game “Pipemania” as a minigame. Rather than have a series of minigames, you are forced to play the same minigame. Hundreds of times. WHY?! Secondly, they have added quicksave AND penalty-free respawning making the game insanely easy and removing any tension as you can just be killed and walk back into the same room and repeat where you left off. Run out of ammo? Just wander round with the wrench and respawn several hundred times. Quick save on its own would have been fine.

So, is it worth playing? Definitely. Its set new standards visually and with its narrative. Its just a shame that those efforts were not matched by the design team, which could have raised this to being a defining game of this generation.

George Pólya

Friday, November 2nd, 2007

Polya_3.jpgGeorge Pólya is a Hungarian mathematician that was discussed a little bit in Papert’s Mindstorms book. While examining potential processes to instill problem solving skills in children, Pólya’s Four Principles are presented, which attempt to create a framework to solve any problem. Here they are, freshly copied and pasted:

Polya’s First Principle: Understand the Problem
This seems so obvious that it is often not even mentioned, yet students are often stymied in their efforts to solve problems simply because they don’t understand it fully, or even in part. Polya taught teachers to ask students questions such as:

  • Do you understand all the words used in stating the problem?
  • What are you asked to find or show?
  • Can you restate the problem in your own words?
  • Can you think of a picture or a diagram that might help you understand the problem?
  • Is there enough information to enable you to find a solution?

Polya’s Second Principle: Devise a plan
Polya mentions (1957) that there are many reasonable ways to solve problems. The skill at choosing an appropriate strategy is best learned by solving many problems. You will find choosing a strategy increasingly easy. A partial list of strategies is included:

  • Guess and check
  • Make an orderly list
  • Eliminate possibilities
  • Use symmetry
  • Consider special cases
  • Use direct reasoning
  • Solve an equation

Also suggested:

  • Look for a pattern
  • Draw a picture
  • Solve a simpler problem
  • Use a model
  • Work backward
  • Use a formula
  • Be ingenious

Polya’s third Principle: Carry out the plan
This step is usually easier than devising the plan. In general (1957), all you need is care and patience, given that you have the necessary skills. Persist with the plan that you have chosen. If it continues not to work discard it and choose another. Don’t be misled, this is how mathematics is done, even by professionals.

Polya’s fourth Principle: Review/Extend
Polya mentions (1957) that much can be gained by taking the time to reflect and look back at what you have done, what worked and what didn’t. Doing this will enable you to predict what strategy to use to solve future problems, if these relate to the original problem.