Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Java Programming

A Look at Java 3D Programming for Mobile Devices 196

An anonymous reader writes "IBM developerworks is running an article that describes the Mobile 3D Graphics API and introduces you to 3D programming for Java mobile devices. Sony's PSP has shown the graphics power you can put into a mobile device and mobile gaming. Although the average mobile phone is technologically behind this specialized game machine, Java seems to be helping to drive the market in a very definite direction."
This discussion has been archived. No new comments can be posted.

A Look at Java 3D Programming for Mobile Devices

Comments Filter:
  • Hello World (Score:4, Funny)

    by deltalimasierralima ( 922001 ) on Wednesday October 12, 2005 @07:05AM (#13772203)
    Wow! Finally I can code 'Hello World' in full 3D glory with realistic 3D shadows!
  • Sony Ericsson phones (Score:5, Informative)

    by wertarbyte ( 811674 ) on Wednesday October 12, 2005 @07:09AM (#13772213) Homepage
    The developer pages of SE offer Mobile Java 3D Tutorials as well: http://developer.sonyericsson.com/site/global/tech support/tipstrickscode/mobilejava3d/p_mobilejava3d _tips_new.jsp [sonyericsson.com]
  • 3D Handsets (Score:5, Interesting)

    by seanellis ( 302682 ) on Wednesday October 12, 2005 @07:10AM (#13772218) Homepage Journal

    Quite a few handsets already support M3G, among them the Siemens S65, Motorola E680, E1000, V980, SonyEricsson V800 and K750i, and the Nokia 6630 and 6680.

    M3G is a lot lighter weight than Java3D, has high and low level APIs, and has its own compact file format for efficient packaging of assets.

    I've been developing M3G technology, both engines and games, since day 1 (I was our company's representative on the expert group), and I am happy that Slashdot has at last highlighted it.

    If you think retreads of "Mr. Do" and "Snake" are going to cut it in the Java space from now on, think again. You might like to look at Superscape's site [superscape.com] for a taste of the kind of 3D games that are already out there.

    Developers might also want to visit Benhui.net's 3D Developer Forum [benhui.net].

    • Re:3D Handsets (Score:3, Informative)

      by Agret ( 752467 )
      There is just no comparison between the PSP and a mobile phone (using your links and the psp comparision in the original summrary)

      http://www.superscape.com/games/title.php?SB_3D,sc reens [superscape.com] Phone basket ball game with "amazing 3D"
      http://www.1up.com/do/media?cId=3142148 [1up.com] PSP Basketball game
      • Re:3D Handsets (Score:4, Insightful)

        by seanellis ( 302682 ) on Wednesday October 12, 2005 @07:59AM (#13772436) Homepage Journal
        The comparison with the PSP was in the original link, not my post. These are very different games on very different platforms.

        On the one hand, we have the PSP - an ultra-slick, hardware-accelerated, single-purpose device which is excellent at playing action games.

        On the other, we have almost-ubiquitous Java handsets (here in Europe, anyway), with enough processing power to run simplified versions of the console games. That is a niche begging to be filled.

        The hardcore g4merz will have a PSP. And probably a GBA, a GBM and an Atari Lynx just in case. Everyone else will have a cellphone. They are very different markets and will have very different expectations and different needs.
    • OMFG! 3D Extreme Bowling. That is just SOOOOO much better than Mr. Do and Snake.

      Seriously, these games look like something a Sega Genesis would be able to do.

      IMHO, the only games that really work on mobile phones are games which do not require any timed action, because the controls on phones just totally suck! This still leaves a lot of genres like RPG's, turn-based (and perhaps slow real-time) strategy games, puzzle games, adventures and board games, sims (think tamagotchi/nintendogs), yet we see VERY litt
      • Odd, considering the vast majority of phone users (even the fanatical phone users) are not typical gamers with typical gamer tastes.

        I don't know what you're smoking but I want some! Every 'typical' gamer I know has a mobile phone, and many of them are also into games on their phones.
        • Re:3D Handsets (Score:5, Interesting)

          by mwvdlee ( 775178 ) on Wednesday October 12, 2005 @08:08AM (#13772488) Homepage
          Yes, I know most gamers have mobile phones.

          Did you also realize that practically the rest of the civilized world also has mobile phones?

          Gamers are but a small percentage of the mobile phone users.

          Especially when using "gamer" in the popular interpretation as one who primarily plays games in the popular (racing, FPS and sports) genres.

          I consider a fanatical phone user, a person who will frequently use SMS, MMS, WAP, built-in cam, built-in MP3 and in general know more than the manual does about the phone. By definition, these are people who are more "on-the-road" than a typical gamer and thus less likely to be a gamer. Apparently conventional popular game genres did not attract them enough to shift from being a hardcore phone user to becomming gamers. Logically, this means that such games would not attract them on their mobile phones either.

          Perhaps you should refrain from smoking anything for a while, might help you to actually understand what you're reading. ;)
    • If you think retreads of "Mr. Do" and "Snake" are going to cut it in the Java space from now on, think again. You might like to look at Superscape's site for a taste of the kind of 3D games that are already out there.

      Looks like poorly disguised retreads of Qix [superscape.com] are fine, though?

      Oh wait, it's got a hot girl in a bikini in it! Feel that innovation! Tssssssss!

    • So what chance does a 3D game have of looking even remotely decent on
      something a few inches square? OMG! WATCH OUT FOR THE .... errr... 4
      pixel squidge coming at you ... no wait ... thats a coffee spot ...
  • Just reminds me (Score:4, Insightful)

    by olddotter ( 638430 ) on Wednesday October 12, 2005 @07:14AM (#13772232) Homepage
    I have a freind who used to work at a major cell phone company. I remember him telling me people would NEVER use java or linux in embedded products because the memory foot print was just too big.

    Ah, Moore's Law, what isn't practical today will be in 18 months (or 36 months, etc.).

    He is a smart guy, he just doesn't have the vision to look out that far into the future.
    • To be fair to your friend, many phones (Symbian, BREW) don't use Java but provide their own C++ API. Many people who have used Java on mobile phones have found that performance and memory management are extremely poor and not really competitive next to C++ (though this is the technology I'm talking about rather than the footprint).

      Motorola now use the "JUIX" operating system which is a combination of Linux and Java so while he was definitely wrong, his mistake was simple enough - assuming that technologic

      • Re:Just reminds me (Score:4, Insightful)

        by LarsWestergren ( 9033 ) on Wednesday October 12, 2005 @08:10AM (#13772496) Homepage Journal
        Motorola now use the "JUIX" operating system which is a combination of Linux and Java so while he was definitely wrong, his mistake was simple enough - assuming that technological superiority would win out over mass-market/buzzword appeal.

        Ease of development, maintainability and porting are also forms of technological superiority, and in this case perhaps more important than pure performance?
        • Java is reasonably easy to develop for, I'll give you that. But, wait until you start trying to write large, real world apps or games. You will suddenly find yourself knowing more about the internals of garbage collectors than you thought.

          Maintainability - nearly all widely deployed Java apps are riddled with #ifdefs done using a custom pre-processor, because phones vary so wildly in bugs and capabilities that you have to produce many JARs from the same source code. Java the language provides zero help wi

        • If you think Java has "Ease of development" you should really try to learn more programming languages.
    • Just to let you know, that 3D is possible on most java phones
      with my embryonic diet3d library :
      http://rzr.online.fr.nyud.net:8090/java.htm [nyud.net]

      OK lot of work to be done to be M3G compliant... (btw, i am open to contribs)

      But what is bugging me : is J2ME the only alternative to WinCE or symbian ?
      since most Linux handset doesnt not provide other API (beside QTopia and his friends)
    • Re:Just reminds me (Score:4, Insightful)

      by Bogtha ( 906264 ) on Wednesday October 12, 2005 @08:28AM (#13772618)

      I remember him telling me people would NEVER use java or linux in embedded products because the memory foot print was just too big.

      Java was designed for embedded products. [wikipedia.org]

      He is a smart guy, he just doesn't have the vision to look out that far into the future.

      Or the past, apparently.

  • by jurt1235 ( 834677 ) on Wednesday October 12, 2005 @07:21AM (#13772254) Homepage
    So will I see the frontside of the object on one screen, and when I turn the phone around to watch the other screen, the back side of the object? That would be pretty cool!
  • Bad Idea! (Score:4, Insightful)

    by Agret ( 752467 ) <alias.zero2097@g ... om minus painter> on Wednesday October 12, 2005 @07:22AM (#13772256) Homepage Journal
    3D Java Games? Anyone re-call the N-Gage?

    This seems like a bad idea to me. Instead of trying to make a phone compete with a gaming console they should be looking for more innovate things that they can make phones do.
    • The original expert group included Nokia, Vodafone, Sony Ericsson, Siemens and Motorola. They were willing to bet some pretty hard cash that it is not a bad idea.

      3D games are not necessarily console games. 3D, like vector graphics or color screens, is another tool for the game developer to use. And you use the tools you have to get the best out of the platform you're on. More tools at your disposal should be better for the game developers, and that impacts consumers positively too.
    • To be fair, the N-Gage failed more because of a crappy game lineup, horrible marketing, and high price tag, rather than 3d games on a cell phone being a bad idea. I mean, they actually went out of their way to insult their target audience.
  • by CyricZ ( 887944 ) on Wednesday October 12, 2005 @07:22AM (#13772257)
    How much would it cost these days for a phone that did not have any unnecessities like 3D graphics, address books, calendars, clocks, and so forth? I'm talking about a cell phone equivalent feature-wise to your typical 1960s telephone. How terribly cheap could something like that be produced for? I'd almost be inclined to think that you could find them in vending machines.

    • ebay for the nokia 8310! It's still one of the smallest and useful phones.
    • I had this from my mother-in-law recently. We went into town to the Vodafone shop. A small handset with all the latest features, on a pay-as-you-go tariff was about £40 ($80). Vodafone also do a "simply" range of handsets which just do phone, text, and nothing else. The cost? £70 ($140).

      Actually, this isn't really a fair comparison - the simple phone was bigger and had a much larger screen, which is a big part of the material cost on a phone.
    • How much cheaper is a 8088 than a Pentium 4? It wouldn't make a lot of difference, if any.
    • How much would it cost these days for a phone that did not have any unnecessities like 3D graphics, address books, calendars, clocks, and so forth?

      Given a display, number keys and telephone connection, which most people would regard as necessities for a mobile phone, you basically get the address book, calendar, clock and Tetris for free. (How long do you think it takes a devloper to code a calculator or an alarm function?) I suppose that if you were willing to ditch the display, you could save, oh, four

    • They would cost about the same.
      Modern cell phones do most of their signal processing in software, so they have to have fairly beefy processors to begin with. So they basically already have the hardware to handle everything you mentioned. They're just trying to get the most use out of the hardware.

      I don't know about GSM but with CDMA the clock needs to be accurately sync-ed to the network for communication to occur. So they just wrote a small program to display the time.
      3D graphics could be easily implemente
      • They would cost about the same.

        ... if measured by money.

        But IMO it isn't true if we measure the "price" in time or nerves you spend "wrestling" with you "smart", "feature packed" and whatever phone while trying to make something which should be easy on the mobile phone, like making a call or sending a text message. :)

        Because I suspect software for phones (that part of software which we can call "smart", i.e. not that part which handles signal processing etc. but those calendars, games, address books, .

    • A series of very cheap phones like the ones you propose are being prepared by major manufacturers for use in the third world. That said, there's a lot of cool stuff you can do with modern mobiles - really we've only started to explore this space. Java gaming is not the best mobile developers can do. Many useful, dare I say .. killer? .. apps can be written that exploit the varied nature of mobile phones. Just wait and see.
    • I have a Motorola V66 (? extremely thin, B&W display) that my girlfriend gave me when she tired of it. It's at least a year old, and probably can't be bought anymore. But it makes calls, and that's about it. It also has a standby battery life of close to 1 week after being at least a year old.
    • "unnecessities"? Isn't a mobile phone itself an unnecessity? People got along fine before them. They planned ahead in advance, instead of "playing it by ear" so to speak. Ok, so it makes life easier. Wouldn't a 3D GPS-coordinated map also make life easier? Yes.

      LS
    • Nokia 1100.

      Does nothing but voice and SMS.

      Costs ~£20 on PAYT. That's ~USD$40.
  • by MaestroSartori ( 146297 ) on Wednesday October 12, 2005 @07:24AM (#13772260) Homepage
    ...even though back in 2000 I wrote a 3D software engine in Java that was more than acceptably fast enough to run Wolfenstein-quality gfx on a P75. And I knew fairly little about optimisation in Java, so that could probably have been faster. Throw in hardware acceleration, and you can bet these'll be fast enough for at least ok game-level graphics. Beyond games, I don't know what use this would have...
    • Would it be possible for you to release the source code to this engine that you've written, so we can verify your claims?

      • If I still had my uni course stuff, I'd be glad to. But alas, those days are long gone...

        Bear in mind I didn't claim it was well designed, extendable, or remotely worth using for anything other than a demonstration... ;)
    • So you can run 8 year old GFX (well in 2000 it was 8 years old anyway) and you call that 'ok game-level graphics'. Maybe you haven't realised but that game is in a totally different generation to todays games. Most people would just look at your game and say "That has crap graphics" and not play it. That's how todays gamers are. I'm old school though and will play anything :) I'd like to see your engine.
      • My point wasn't that Wolfie 3d graphics are acceptable. It's that I'd guess that acceptable graphics are possible given what I had running *without* hardware acceleration a few years ago. And thanks for the interest, but my old code is somewhere on a uni machine if it exists anywhere. If anyone at Strathclyde Uni finds it, they can post it if they want :)
    • by vidnet ( 580068 ) on Wednesday October 12, 2005 @08:16AM (#13772540) Homepage
      For a taste of what java can do, try Jake2 [bytonic.de]. It's a Quake2 engine written entirely in java (easily started via webstart, on both linux and windows, and automatically downloads the Quake2 demo files if you want).

      You would never be able to tell that it's java.
    • WOW. where to begin?

      first off, i love java, and its use has employed me for >5 years now. and i agree that with modern JIT compilers, the language itself is pretty damn fast. not C fast, but pretty damn close to C++ fast. that being said:

      for graphics, it still sucks. Swing is slow. SWT is better, but not great. JOGL is coming along, but immature. use java for server-side programming. that's where it kicks ass.

      second...wolf3d ran on my 286! in 1990!!! arguing that java isn't slow by claiming t
  • Explain this to me (Score:4, Insightful)

    by RootsLINUX ( 854452 ) <rootslinux@gmai[ ]om ['l.c' in gap]> on Wednesday October 12, 2005 @07:27AM (#13772276) Homepage
    Why would I want (or even care) to have 3D graphics on my mobile phone/device? The screen is already tiny. I'm sure 3D graphics are more computationally expensive and power-consuming than traditional 2D graphics. And in the end, I'm still just looking at a 2D projection of a 3D image. Its not like I want to be playing Half-life or another FPS on my cellphone. I'm sorry but this just seems stupid to me and I get the feeling that the only people who will want this "feature" will be the hard-core tech gadget geeks out there. Does a 3D API bring *anything* useful to the mobile table???
    • by CyricZ ( 887944 )
      Do you or I need it? Of course not. We'd get a phone to increase our productivity. But that's just because we're into getting work done.

      They've reached a point where basically everyone has a cell phone that does everything they _need_ it to do. Now they need to start throwing in gimmicks like this to get people to upgrade. This is especially true for the "teenyboppers" or "hardcore gamerz" who are easily amused by gadgetry such as this. Chances are there'll be many 13-year-old boys and girls begging their p
    • Well, obviously, 3D games aren't going to be for everybody. There are some people who are quite happy playing "Snake", thank you very much.

      One of the things that the M3G group was very careful about, though, was to ensure that it wasn't "just" a game engine. It's a fully-featured 3D engine which means that developers can use it for whatever they want.

      Obviously, games are likely to always be the most popular application, but others are possible.
      • Yeah like screwing up the phone.

        My V220 won't boot anymore [never hooked it up to the USB] after I deleted the annoying backgrounds/java games/etc off the phone. Me thinks it deleted something more important... I'd rather have simpler phones that are less likely to screw up in this way.

        And of course, there are a million "rogers" booths [my provider] in every mall, corner plaza, etc. Except when you go in there their only mission is to sell you NEW PLANS. They don't care about service or maintenance.

        Well
    • <meta-rant>

      I don't think you made an insightful comment.

      We already knew there were lots of people who didn't care about 3d on their phones. Move along. Nothing for you to see here.

      At least you are not one of those whiners who complain about bad service and say that R&D should go into improved their flawed voice phones, instead of useless features.

      This is an article for _developers_ who _do_ care about 3d in phones. Maybe _you_ don't have an obvious application for that. Some other people might.

  • by betasam ( 713798 )
    One of the early companies focusing on Mobile Phones was Fathammer [fathammer.com]. Initially they started out with a ports of Doom engine based classics; now seem to have a nice collection. I believe the stronger driver of applications on phone platforms is the phone hardware. Java 3D API is one more trial at luring in more applications by providing easy-to-use API. But even if Handspring and Palm were to provide 3D programming API for their Treo series (or anyone else does likewise), it still depends on the hardware. Thi
  • Neat article (Score:4, Interesting)

    by LarsWestergren ( 9033 ) on Wednesday October 12, 2005 @07:39AM (#13772335) Homepage Journal
    I have some friends who are working with developing Java games. So far the big money is not in developing titles for phone companies portals (or even worse trying to sell them to the end user yourself) but to develop ad games for companies who make them available for free downloads, usually as a part of a competition.

    From what I understand, the best part of the job is that since graphics on mobile phones and other limited devices are so cruddy development focus tends to be on addictive gameplay rather than eyecandy. It is also still possible to be a small independent game studio, no need for a big art studio to render hours of CGI, etc.

    Worst part is that just about all phone developers are very sloppy when it comes to implementing the J2ME standards and all models tend to have their own quirks. Sony Ericsson and Nokia are probably the best, but that is not saying much. So in this case, it really is "write once, debug everywhere" type java.

    Mobile gaming is really taking off, I read on GameDev [gamedev.net] for instance that mobile game developers Gameloft increased their workforce from 432 to 1375 employees.
    • Worst part is that just about all phone developers are very sloppy when it comes to implementing the J2ME standards and all models tend to have their own quirks. Sony Ericsson and Nokia are probably the best, but that is not saying much. So in this case, it really is "write once, debug everywhere" type java.

      And this actually really says it all. Most of the effort of doing a J2ME game seems to go on making it work on various devices and conform to operator wishes (and they are plentiful and vary a lot).
  • by MBCook ( 132727 ) <foobarsoft@foobarsoft.com> on Wednesday October 12, 2005 @07:49AM (#13772391) Homepage
    There! That's it! Java is the solution!

    There are so many people (me included) who would love to be able to program for the PSP, but they won't open it up for various reasons (fear of piracy, mostly).

    So why not give people a Java sandbox (J2ME would be fine) to play in? That way they can make games and other fun things, but they won't be able to use it to boot pirated games off memory sticks and such (unless they REALLY mess up the JVM). Seems like a perfect solution.

    They sold the Net Yahorzee, why not give us this? Download a copy today (tied to the PSP's serial number to prevent copying?) for only $20! They'd make a fortune.

    • Because java is a waste of time and effort? Because the device runs MIPS processors with limited memory? ???

      If anything they should open the platform up. Not like people are not going to buy things like GTA PSP or whatever just because a tetris clone exists. It would get more people in contact with the PSP which will drive up the demand for it.

      If course you have to think outside the box for that...

      Tom
      • But when you truely open it up, then people can use homebrew code to launch copied games and other things Sony doesn't want them to do. Java prevents that.

        As the processor and memory, they will take a hit from running Java but it would still be WORLDS ahead of what even high end cellphones offer. More than enough for most homebrew games and platformers and other fun stuff. Plus you've got the fast 3D hardware which could be exposed (either though Java3D, or a JNI thing for better performance).

        I thought of

        • If people want to go out and manufacture UMDs on their own dime, so be it.

          Even in the GBA scene most people don't pirate games despite the fact it's very simple. In fact of all the places I've been *I've* been the only person with a flash cart. All the peeps in airports and on trains I've seen have had legit games.

          The homebrew scene is just that, hobbyists. When it comes down to it the vast majority of people still go out and buy games.

          Tom
          • I agree, I have a flash cart too which I have used to play and develop home-brew games. But when the suits are probably saying "No" to anything that even opens up the remote possibility that one day someone might use it to steal a game, the "safety" of Java might make it "OK" by them.

            It's not an issue of reality, it's an issue of business.

            But like I said, they could also give a managed environment like the PS2 had with Linux.

            • I think I was making a different point. Yes, there is an active GBA, PSP and DS devel scene but my point was moreso that of all the console owners out there the people with the facilities to actually pirate games is a low percentage.

              I mean I can rent games at blockbuster for 5$, rip the game to my HD and then use my flashcart to play the game whenever I want. I don't because it's not worth the trouble. What I do use my gba carts for [other than programs I write myself] are things like PocketNES.

              But the p
    • Fear of piracy? I assume you haven't examined the way the console market works for very long. Console makers want 1. a cut of your profit on every game you sell and 2. a barrier so that not any old dweeb can go make a PSP game featuring George W. Bush and Kofi Annan both wearing women's underwear and being in the same room.

      1. Is easy, licensing cost. You can't make UMD discs, you're not allowed to put games on UMD discs, you can't sell them. Sony can, and they will sell each and every one of those discs to
  • The article is interesting and is very informative.
    My only objection is that I do not like playing games on a tiny screen using tiny buttons. Since most games nowadays are not just 'steer and shoot,' the complexity of the controls and intricacy of the graphics plays into the overall fun of the game.
    I applaud the efforts to get better 3D graphics for mobile devices, but I don't think I will ever be wasting my time playing games on my cell phone. It is much more enjoyable to play a console system on a l
  • John Carmack (Score:2, Informative)

    by vasqzr ( 619165 )
    He made a comment a while back:

    "The biggest problem is that Java is really slow. On a pure cpu / memory / display / communications level, most modern cell phones should be considerably better gaming platforms than a Game Boy Advanced. With Java, on most phones you are left with about the CPU power of an original 4.77 mhz IBM PC, and lousy control over everything."

  • I'm still waiting for a sub-$200 phone that'll integrate with *SOME* calendaring system from Sprint.
  • It's all about choosing the right language for the right job. 3D Java would be perfect for that 3D glacier screensaver I had in mind. You'd be able to watch it travel down the mountain and melt. Don't worry. Java is fast enough to still be realistic when you take global warming into account.
  • Perhaps I have misunderstood, but I thought that Java 3D made OpenGL calls under the covers. Is this the case. Java's fatal flaw has always been that it must use low level NMI modules written in C or C++ to get anything done. When Jim Gosling choose not to have pointers he basically decapitated the language. Therefore, all Java programs that need to manipulate memory mapped registers are a kludge by design.

  • 3d user interfaces (Score:2, Informative)

    by Goodbyte ( 539941 )
    I have just had my final lecture in a course on Mobile Computer Graphics [cs.lth.se] and there is a lot more to mobile 3d graphics than producing nice games. Especially there was one lecturer from TAT [www.tat.se] that makes user interfaces for mobile devices, and the possibilities for creating more userfriendly interfaces are endless with 3d graphics. I am not just speaking of eye candy, but useful animations that help the user navigate the menu tree.
  • This isn't Sun's badly designed Java3D [sun.com], which is now abandonware. It's just a wrapper for a subset of OpenGL embedded devices. [khronos.org] That's reasonable enough. It helps to keep OpenGL alive. Microsoft would like to force everyone to use Direct-X.

    The base embedded subset of OpenGL leaves out display lists, any geometry more complicated than a triangle, and all the new programmable shader stuff. It's basically what an SGI machine had twenty years ago.

    This may or may not be useful for cell phones, but it will

    • I'm afraid that this is incorrect. M3G does, intentionally, borrow concepts from OpenGL and is implementable on top of OpenGL, but M3G is not just OpenGL/ES wrappers for Java. (That's JSR-231 and JSR-239.)

      The article in the original post is part 1 of 2. Part 2 will show the scene tree manipulation functions and the high-level stuff. This includes file loading, animation, alignment, etc.
      • Yes, M3G has a file loader and a scene graph mode. The M3G file loader is a bit too powerful, because it can load general Java objects, so it has virus potential.

        Scene graph systems are somewhat out of favor in the game developer community. They're not powerful enough to be a game engine, and they're overkill for a 3D drawing engine. There have been many scene graph systems, SGI's Inventor being the first big success. They're nice for simple little games, but they usually scale up badly. For the smal

Life is a game. Money is how we keep score. -- Ted Turner

Working...