views:

347

answers:

4

How do I begin developing J2ME games for mobile phones?

  1. Are any libraries available that can render pixel fonts for text? - for text games
  2. Are 2D graphic libraries available that can draw animated bitmaps? - for isometric and tiled games
  3. Any are 3D engines available with texture mapping & lighting? -- for racing and flying simulators

And regarding screen sizes:

  • What screen size to choose initially for good market penetration?
  • How to manage game source code, in different screen sizes? Make separate branches?

I'm new to J2ME programming, so any links you can give me to start off would be great.

+5  A: 

Game Programming Crash Course to begin developing simple bitmap games.

mcandre
+3  A: 

Screen size of 240x320 pixels is where most j2me-enable phones are these days.

Obviously, touchscreen phones usually have bigger screens than this. A VGA size of 480x640 is just around the corner for high-end phones.

Different screen sizes are usually handled by having generic code that can handle any screen size and can modify layout depending on in-Jar configuration files. You then simply make several jar files, all containing the same compiled code but different values in the configuration files.

For 3D graphics, a lot of phones these days support http://www.jcp.org/en/jsr/detail?id=184. Recent Sony-Ericsson phones also have http://www.jcp.org/en/jsr/detail?id=239 which should be easyer to use if you already know OpenGL. 3D performances vary widly between phones that contain a hardware accelerator chip and those that don't.

Animated bitmaps on J2ME usually means making you're own redrawing thread to refresh the screen. The only image format officially supported by the MIDP specification is PNG.

Because of this last fact, if you want to create your own pixel font, you are pretty much going to need to have each character in a PNG image.

You might want to look at LWUIT, an open source library published by Sun.

QuickRecipesOnSymbianOS
+1  A: 

There's this incredible list of open source J2ME libraries that do all sorts of things, like UI, Graphics, Games, 3D, Bluetooth, SMS, IM, Math, Security, Databases, XML .. even Dev Tools.

Java ME Open Source Software - ngPhone

Jenko
+2  A: 

I know this isn't a direct answer to your question, but I think J2ME is slowly on the decline, and Android is taking its place. You may want to take a look at the iPhone as well, even though it's not Java. For the iPhone, you're looking at 480x320 screen size and you can use Cocos2D for the 2D games.

Also check out Kevin Glass's website, which has a lot of notes about 3-way instantaneous deployment to Applet, Android, and iPhone. More details are here.

Eli