Writing custom, simple 3D renderer under J2ME

I know this depends upon hardware and whatnot but I would like to know if anyone’s written a basic 3D renderer(no lighting) in J2ME and managed to get it running faster than the Moon orbiting the Earth?

Problem is that there is overhead in having a JVM on a mobile phone and thus performance would be more limited than normal, so looking at mobile phone specs may not be the deciding factor.

Thanks.

Mobile phone specs vary widely. I had a Siemens S55 a couple of years back and struggled to write a 2D scroller without using the siemens specific class library. I had to prerender the entire level. Also transparency was not part of the standard image spec. Using the siemens specific libraries was the only option for decent performance. That is why phone games are tailered for each family of phone.

Some of the current phones are a lot faster. My Sony Ericsson 750i fairly rips along in comparison and also supports Java3D (although this isn’t the same as J2SE Java3D). Simple 3D is possible on that. Thus things are getting a bit more standardised, so hopefully less porting is the way of the future.

Writing a custom (i.e. software renderer) is almost certainly a non-starter. The processor is only 200 to 400MHz at best and in most cases more like 20MHz, while the screen sizes are getting bigger. Maybe simple wire-frame graphics (BBC Elite style) would be ok. (Edit: Maybe a quake-like 3D implementation at QVGA resolution might be doable at 400MHz, provided the java implementation includes hotspot)

Another problem is the limitation of phone buttons. Quite a few phones can only see a single button press at a time, which makes real time shooter games a touch tricky.

Note that you need to download the toolkit for the phone you are targeting and even then, performance on the PC emulator is normally not representative of performance on the phone. Also note that the last time I played with J2ME was a couple of years back, so I’m not really current on it. In particular I haven’t actually tried the Java3D on my 750i.

Alan

/Edit: Better 3D graphics is coming. If you’ve not already read it, look at this thread. Nice link to website in about 3rd post down too.
http://www.java-gaming.org/forums/index.php?topic=12644.0

As OpenGL ES is not available on any mobile’s Java section I would write a very basic 3D renderer, mostly for bragging rights.
I obviously don’t intend to write a real time game, just a board game with 3D visuals.

If it’s not a real time game, then you should be able to render 3D in software on a fast phone. Even so, this is only really practical if the phone has implemented hotspot. For a board game, you could do a pseudo 3D isometric (actually 2D tiles drawn in 3D) without breaking out a sweat.

For decent performance, I’d look for Java 3D or Mascot 3D support though.

nokia recently has released n93 phones which support opengl es 1.1 and also have accelerated graphic chip (maybe someone know what is it ati ? nvidia?) also sony ericsson has relesed new phones with graphics 3d chips so probably other vendors will go that way. Maybe in two years time we will have in the market cheap masive produced phones with accelerated graphics. Java 3d (M3G) is another story it is fast fir such phones like k750 or nokia 66xx family but for phones like k500 etc is still too slow, mascot capsule is only way to achive fast graphics.

I think that for today java mobile games creating some simple like wolfenstain 3d engine is good idea, there are lots of such games and theyir prformane is quite impresive even on oldest nokias with only 200kb ram. Those games will have better quality in today sold phones with midp 2.0 (even without m3g) which are really fast and can handle simply software 3d graphics.

I would definitely go with M3G (seems to be the standard api), but if you want to write a custom renderer (for whatever reason) then go for it. Never write software for what’s on the market, always shoot ahead a few years… the manufacturers come out with new phones every month it seems (and people buy them for thousands of dollars a piece), so in a few years, they’ll have FPU’s and gigahertz CPU’s not to mention a GPU…

–Bart

hey,
Well as far as I have worked with m3g, jsr 184 is abloslutely poor in performance. There is an severe need for OpenGL es, java implementaion / something else, like JNI for faster performance. Writing a custom render is an option, only if you do not use floating point calcs :slight_smile: