Saturday 28 June 2008

Mobile Phone Gaming with Java.

I've been hearing a lot about "Casual Games" recently and have been thinking about looking into making some myself. While developing for the PC or Apple Mac is probably the simplest way to do this, it's not very interesting since I do that all the time anyway. Developing games for mobile phones, however, is much more novel and also more challenging because of the comparatively limited power, so I decided to start investigating how to do this. After downloading and installing the J2SE and J2ME development kits from Sun, I began experimenting with the provided phone emulator and my actual PDA to see what could be done.

As John Carmack wrote, a major obstacle when designing games for phones is the method of input. For example, on my Phone/PDA all I have to work with is a D-pad with a "Fire" button in the middle. First of all, having the fire button in the center of the movement buttons is not a good design for any sort of game where input needs to be quick and precise, and, secondly, my phone detects only one button press at a time, so there can be no diagonal movement and no movement while pressing fire. These are serious limitations for any sort of dynamic game.

One solution that I have come up with is to use the touch-screen instead of the D-pad. This allows the player to control their movements with the stylus and use the fire button without the D-pad interfering. Unfortunately, not all phones have a touch screen, so designing a game that relies on a stylus for input would prevent it from being played on several devices. Also, the phone emulator provided with the J2ME development kit does not provide touch-screen emulation.

Turn-based gameplay seems to be the best idea here. Something like Advance Wars or a Final Fantasy 6-style RPG would work well with a bit of thought. For dynamic games, things such as Pong or Pac Man would work well because there is no need for a Fire button and only one directional button needs to be pressed at once.

No comments: