Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: J2ME: The next major games platform? - JavaWorld March 2001

J2ME: The next major games platform? - JavaWorld March 2001

Tutorial Details:

J2ME: The next major games platform?
J2ME: The next major games platform?
By: By Jason R. Briggs
Is J2ME feasible as a high-end games platform for mobile devices?
o you think that Java has become a little staid and unexciting? As a language matures and your experience with it grows, does it not naturally become less interesting? Well, that's what I tend to tell myself.
I have a theory about what really sells a language -- that is, for those developers who are lucky enough to choose the paradigm they work in. My theory -- completely unscientific, of course -- is that developers base their decisions on two simple factors:
The coolness factor
The "what's-in-it-for-me" factor -- in other words, how many jobs will it generate, what kind of work will I do, what sort of career path does it offer and, most importantly, what is the likely salary?
In Java's early days, the applet drew developers to the emerging language. When I read about Java in a magazine article in 1996, I was interested, but it was not until I saw my first applet that I became hooked on the idea -- the coolness factor clearly at work.
Since then, other client-side Web technologies have grown popular -- without completely replacing Java in the browser -- and consequently, developers now choose a language for what's-in-it-for-me reasons. As the demand increases for Java developers, salaries continue to head skyward.
Eventually the coolness factor cooled, as did general excitement for the language, until Java 2 Micro Edition (J2ME) came along.
J2ME did not just suddenly appear; PersonalJava has been around for quite some time and is currently up to 1.2. However, J2ME represents a fairly strong commitment from Sun to the embedded/mobile market, and it now seems that the market is finally taking notice, judging by the number of forthcoming products being developed to support Java in one form or another. Note that J2ME includes PersonalJava, EmbeddedJava, and the new Mobile Information Device Profile (MIDP).
Smaller is better?
If you believe industry analysts, who sometimes rival movie critics in their accuracy, embedded computer usage will grow by enormous percentages over the next three to five years. Mobile phones and PDAs are just the tip of the iceberg. Home networking, wearable computers, and more hover in our near future. What better platform to power the applications on those new devices than Java?
All the reasons for using Java on the desktop and server apply to smaller machines as well, and the most important reason, of course, is platform independence. With the possible exception of Palm, no single operating system rules the world of embedded devices at the moment, at least not compared to the desktop world. Some argue that portability is not an issue for embedded devices; speed and stability take precedence. While it may not be essential to operating system or hardware manufacturers -- who, after all, want more products for their systems than are available for their competitors -- I believe portability remains a concern for developers. The more market you have, the more money you can make.
The killer app
So what will be the first killer applications for cutting-edge mobile phones that sport color screens and broadband Internet connectivity? The answer: games. What sort of games? Answering that question exposes a slight inadequacy with J2ME: as opposed to the original Java killer app, the applet, it's difficult to demonstrate J2ME's potential and thus difficult to demonstrate J2ME's coolness.
To see an applet in action, you just launch a Web browser and point it in the right direction. But because of the lack of real hardware available for developers to experiment with, demonstrating a MIDlet (an application written for devices supporting the Mobile Information Device Profile) on a mobile phone is a difficult proposition, particularly outside the United States and Japan. Worse yet, a mobile phone CPU may run at less than 20 MHz, a Palm Pilot at 16 MHz to 20 MHz, and a high-powered color PDA at 200 MHz. Mobile computers such as Cell Computing's Plug-N-Run Modules can run at 500 MHz and over.
You could feasibly use all of those devices to deploy J2ME applications. But which processor speed do you develop for? Which market is likely to be the largest? Some of those devices are popular now, but which will be popular in the next few years?
The proliferation of emerging devices and those devices currently in development exacerbate the problem even further. And don't forget the growing number of companies developing Java on the metal -- running Java bytecode directly on the CPU -- which promises an increase in speed and perhaps entices more consumer electronics manufacturers and their products into this ever-expanding device market. ARM is one such company that has recently announced Java support on its processors (see Resources for more information).
Even putting aside those technical considerations, a final -- and arguably fundamental -- complication for the moment is that you cannot describe the technology as approachable with respect to the nontechnical public at large. That is, until John Q. Public is able to wander down to the local electronics store, pick up a mobile phone or PDA with Java already built in, and try out the technology without having to download or install anything.
Ultimately, if you have faith that those issues will sort themselves out as the technology matures -- look at the features and performance improvements of the standard JVM to realize that it will take a while to iron out any wrinkles in J2ME -- your choice of game type will depend on what approximate processor speed you decide on. For example, if you target mobile phones, the games will be simpler, as will the graphics. However, those games that will really make an impact will be graphic intensive. Imagine a massive multiplayer role-playing game (RPG) with basic 3-D graphics, running on a PDA. While it is not exactly the most original idea, it is a suitable example and a good starting point for this discussion. The big question: Can you build that type of game with Java?
MIDP or PersonalJava: The battle of the midgets
The two major players in J2ME at the moment are the Mobile Information Device Profile (MIDP) and PersonalJava. Does one or both of these provide the facilities and performance required to develop a 3-D game?
The MIDP is at the bottom end of the ladder: a redesigned version of Java intended to run on the simplest devices. Because of its limited processor speed, limited memory, and low resolution, you are restricted in what you can do with the MIDP. 3-D is entirely possible on MIDP devices; for example, vector graphics can use the standard Java graphics primitives, such as line and polygon drawing, to produce 3-D shapes. However, the lack of ability to directly blit -- copy raw pixel data -- to the screen from a pixel buffer, for example, makes life rather difficult for anything more advanced, such as particle effects or simple texture-mapping (see sidebar, How Not to Blit ).
So if not MIDP, what about PersonalJava? PersonalJava has been around much longer than MIDP and supports a larger subset of the standard JDK, which means that working with raw pixel data is quite simple. In addition, specifications have been accepted for development in the Java Community Process that more tightly integrate PersonalJava into the J2ME framework: the PDA Profile for J2ME and the Personal Profile Specification.
The PDA Profile describes "...a standard platform for small, resource-limited, handheld mobile information devices..." (from JSR #000075 PDA Profile for J2ME). In hardware terms, that means a memory capacity from 512 KB to 16 MB, and "...a resolution of at least 20,000 pixels" (see Resources for more information).
The Personal Profile defines its targets as having a minimum of 2.5 MB ROM, 1 MB of RAM, network connectivity, and the ability to run applets. In addition, it "will also provide a smooth transition for those utilizing already-existing versions of PersonalJava technology" (from JSR #000062 Personal Profile Specification). Once products emerge based on those two profiles, PersonalJava as we know it now will begin to move into the mainstream of J2ME.
Moore's Law and the game development life cycle
One of the more quotable theories in the information age, Moore's Law states that processor power will almost double every 18 months. At its present pace, the computer industry exceeds that estimate.
Currently, the low end of the processor scale for PDAs averages around 20 MHz, like the Palm IIIc. The higher end would compare to the soon-to-be-released Yopy -- with a Linux-based operating system -- which has a 206 MHz processor, or Compaq's iPaq, which also has a 206 MHz processor. Thus, according to Moore's Law, you could expect high-end PDAs on the market in 18 months to have a processor speed of around 400 MHz, which is in line with the laptops and even desktops that many people currently use.
With large development teams, it can take anywhere from 12 to 36 months to develop PC and console games. Some of the more complicated games are pushing that upper end of the scale; however, you would expect a game for a PDA or mobile device to be at the bottom end.
Possibly then, a good rule-of-thumb in constructing a J2ME game would be to aim for the processor speed expected at the end of the estimated development time.
My imaginary friends
Back to the original question of feasibility. In the tradition of 8-year-olds all over the world, I have invented an imaginary team of experienced Java developers. I estimate that my team can complete development of my revolutionary multiplayer 3-D RPG in about 15 months, with the target platform being high-end PDAs. Being a tad conservative, I am unwilling to take Moore's Law entirely at face value, so I'll anticipate that by development's end, processors between 280 MHz and 320 MHz will be available


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
J2ME: The next major games platform? - JavaWorld March 2001

View Tutorial:
J2ME: The next major games platform? - JavaWorld March 2001

Related Tutorials:

3D graphics programming in Java, Part 3: OpenGL
3D graphics programming in Java, Part 3: OpenGL
 
How to write a Java Card applet: A developer's guide
How to write a Java Card applet: A developer's guide
 
Enhance your Java application with Java Native Interface (JNI)
Enhance your Java application with Java Native Interface (JNI)
 
Will Big Blue eclipse the Java tools market?
Will Big Blue eclipse the Java tools market?
 
Jini's relevance emerges, Part 1
Jini's relevance emerges, Part 1
 
Effort on the edge, Part 1
Effort on the edge, Part 1
 
Big designs for small devices
Big designs for small devices
 
Develop state-of-the-art mobile games
Develop state-of-the-art mobile games
 
Software Download Central compatible.
GNU getopt - Java port A while back I found myself in need of a Java command line option parser. Unsatisfied with free versions I was able to find on the net, I volunteered to port the GNU getopt family of functions from C to Java. The current release
 
JForumFusion
About jForumFusion JForumFusion is a platform independent discussion board program.
 
The eXo platform
The eXo platform The eXo platform™ software is a powerful Open Source corporate portal and content management system. Users of the platform have a customized single point of access to the company's information system and resources. The use of a corpora
 
Power Messaging, Maps and more...
BuddySpace is an instant messenger with four novel twists: (1) it allows optional maps for geographical & office-plan visualizations in addition to standard 'buddy lists'; (2) it is built on open source Jabber, which makes it interoperable with ICQ, MSN,
 
Game Canvas Basics
Introduces the MIDP 2.0 GameCanvas class and the game loop concept. Required reading for all aspiring "first person shooter" developers.
 
Struts, JavaServer Faces, and Java Studio Creator:
The Evolution of Web Application Frameworks Sun Microsystems' Craig McClanahan, the creator of the Apache Struts Framework, co-specification lead for JavaServer Faces 1.0, and prime architect for Sun Java Studio Creator's new release, explains all three.
 
We are providing Knoppix 3.4 Live Linux CD's
We are providing Knoppix 3.4 Live Linux CD's Knoppix Linux CD's Now Available Linux Knoppix 3.4 CD's What is KNOPPIX? KNOPPIX is a bootable Linux CD with a collection of various GNU/Linux software. It auto-detects hardware and supports many
 
We are providing Knoppix 3.6 Live Linux CD's
We are providing Knoppix 3.6 Live Linux CD's Knoppix Linux CD's Now Available Linux Knoppix 3.6 CD's What is KNOPPIX? KNOPPIX is a bootable Linux CD with a collection of various GNU/Linux software. It auto-detects hardware and supports many
 
We are providing Linux CD's for free.
We are providing Linux CD's for free. Knoppix Linux CD's Now Available Linux Knoppix 3.3 CD's What is KNOPPIX? KNOPPIX is a bootable Linux CD with a collection of various GNU/Linux software. It auto-detects hardware and supports many graphics
 
Buy Peanut 9.6 Linux in India from us. Peanut 9.6 distribution is available in India.
Buy Peanut 9.6 Linux in India from us. Peanut 9.6 distribution is available in India. Peanut 9.6 Linux Now Available Peanut 9.6 Linux CD It is a Linux OS (operating system), especially made for those new to Linux. This is the most POWERFUL and
 
Techniques used for Generating Dynamic Content Using Java Servlets.
Techniques used for Generating Dynamic Content Using Java Servlets. Techniques used for Generating Dynamic Content Common Gateway Interface (CGI) For any web application high performance and timely delivery are key ingredients to competitive
 
New Technical Articles: 64-bit Programming on Solaris 10 OS for x86 Platforms
Four technical articles describe the new Sun Studio 10 software's 64-bit programming features on the Solaris 10 OS for x86 and AMD64 platforms. Important issues regarding the AMD64 ABI (Application Binary Interface), debugging, migration to 64-bits, and p
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.