Throughout the IT industry's history, computer games have been one of the drivers behind technology innovations. Computer gamers are hungry for more hardware computing power; they are eager to push the limits of various software—from compelling graphics to artificial intelligence (AI) to network security. Game developers and players are often the earliest adopters of leading-edge computer technologies. Due to their innovative nature, games are not in danger of becoming technology commodities controlled by big outsourcing corporations—there is always plenty of room for talented individual innovators in this space.
The market for games will continue to grow as the technology enhances the playing experience. As the enterprise IT revolution improves our work life by saving time and money, we spend more time and money on games to improve the general quality of life. Even in today's difficult economic times, gaming remains a fast growing and profitable industry sector. Java developers should not overlook the tremendous opportunities here.
As in the rest of the IT industry, the latest buzz in the game industry is mobility. Mobile games have brought together many unlikely players from traditional enterprise companies (e.g., Sun Microsystems' new game division), equipment manufactures (e.g., Nokia's N-Gage and Qualcomm's Brew devices), and network operators (e.g., Vodafone's content services).
As Java developers, we are well suited to enter this profitable new industry sector because the Java 2 Platform, Micro Edition (J2ME) is emerging as one of the most widely supported mobile gaming platforms. In this article, I discuss the opportunities and challenges of mobile gaming from a Java developer's perspective. I also survey state-of-the-art mobile Java technology through important J2ME specifications.
Mobile game characteristics
Mobile games' financial appeal comes from their wide reach. Mobile phones have become tightly integrated into the modern lifestyle. They are second only to keys and wallets as the most commonly carried personal items. Unlike traditional console games that target geeks and teenagers, mobile games are accessible to anyone—anywhere, anytime. Although each mobile game is inexpensive, the projected large volume (e.g., a new game per week per person) will make this market immense and profitable. However, for developers, mobile games present a big paradigm shift from console games due to the vastly different target audience, lifestyle, and distribution models. Let's start with mobile games' requirements.
A successful mobile game will likely have one of the following characteristics:
- Easy to learn: Since mobile games target general consumers not computer-savvy techies, they cannot have steep learning curves. Consumers will not spend hours studying an operation manual of a game. The game must be playable the moment it is downloaded. It is essential to keep the game simple.
- Interruptible: Multitasking is a basic characteristic of the mobile lifestyle. A mobile user often has small chunks of free time available between tasks (e.g., while waiting for an email or a taxi to arrive). The same device is used for games, calendar management, messaging, and work data access. A good mobile game should provide entertainment value for short time periods and allow users to switch smoothly between game and work modes.
- Subscription based: Mobile games' financial success depends on their large volume. It is expensive to design and develop each game from scratch. For a mobile game developer to make money, it is important to offer multiple titles from the same game engine along similar basic storylines. Subscription-based games are the best way to generate sustained revenue.
- Rich social interactions: No matter how good a game design is, it quickly becomes boring when the player figures out the underlying pattern or has exhausted all the play routes. For subscription-based games, it is important to incorporate other human players to increase the intelligence and randomness of the game play. Games with rich social interactions have proven successful in many of today's massively multiplayer games.
- Take advantage of mobile innovations: A huge amount of mobile technology research dollars have been spent on improving the usability and reliability of devices and networks. As a result, the mobile device hardware and network protocols are very different from the desktop/console world (e.g., Global Positioning System (GPS) extensions, barcode scanner, and Short Message Service (SMS)/Multimedia Message Service (MMS) messaging). Good mobile games should take advantage of those innovative device features and network infrastructures.
- Nonexplicit content: Since all age/gender groups play mobile games and often in public/work settings, you should avoid explicit violent or sexual content.
Types of mobile games
Based on the above criteria, the most successful future mobile games are casual games that provide entertainment value to a broad range of players in all social settings. In particular, the following types of games are emerging as tomorrow's killer games:
- Multiplayer games: Those games could provide mobile access to established online game communities. Or, they could create completely different social structures taking advantage of mobile-specific features such as the multimedia messaging and location-based services. Good game design and management are crucial to this type of game's success.
- Content-based games: Those games deliver copyrighted multimedia entertainment content, such as celebrity photos, video clips, voice ringtones, and personalized sports games to music/movie/sports fans. The key to success is to provide a flow of high-quality content that justifies the subscription cost.
- High-impact visual games: PC and console games have evolved from 2D to 3D. Mobile games will follow this trend too. There are already several mobile 3D toolkits and handsets available. However, 3D games are very resource intensive. They require expertise from both developers and graphic designers. Professional shops will most likely develop these games.
During mobile games' early days, most developers were enthusiasts who wanted to play with their devices, learn new skills, and make a quick buck. However, as more developers enter this space, mobile games have evolved into major productions that involve professional designers, architects, developers, business dealers, lawyers, and artists. This is an inevitable trend as the industry matures. For developers, this change poses both challenges and opportunities. While it is harder to develop and sell simple games in one's spare time, more pro shops will offer better employment opportunities for many people.
The mobile value chain
To fully understand the mobile game landscape, you must understand how the money flows. This business's value chain is considerably different from traditional games or enterprise applications:
- Developers: Software developers drive the value chain by creating great applications. However, most developers do not have the capacity to handle mass marketing. They also lack the distribution channels to reach consumers.
- Publishers: Game publishers aggregate titles from developers. They build a brand name, certify the game for technical correctness, promote the game, and build business relationships with wireless carriers. Publishers also handle billing on the developer's behalf and typically share revenue with the developer.
- Wireless carriers: Wireless carriers are at the center of mobile game distribution channels. Carriers not only control the network but also own the customer information. It is up to them to decide what devices and services to support. Carriers take a big chunk of money out of the overall profit. Carriers can also bill the customers through existing service agreements.
- Wireless device manufacturers: Device manufacturers drive the technical innovation. They make new hardware and support development platforms. In fact, J2ME's success is largely due to major device manufacturer adoption. Device manufacturers represent an independent force between carriers and consumers.
- Consumers: Consumers eventually pay for the costs and margins incurred for the providers along the chain. A consumer can purchase games from the publisher's Website or through content provisioning systems provided by the carrier.
Figure 1 shows the value chain.
J2ME smart clients
The J2ME platform has emerged as the most prominent mobile gaming platform widely accepted by developers, device manufacturers, network carriers, and consumers. It has some very important features that benefit all parties.
Smart client characteristics
J2ME devices are smart. They can process information on their own. These are the most important characteristics differentiating J2ME smart phones from previous generations of mobile phones:
- For users, a smart mobile phone's most appealing feature is that you can play games without always-on network connections. Offline mode is necessary in today's 2-2.5G networks where the coverage is sporadic and data traffic is expensive. The ability to cache data and queue network operations into transactions also significantly reduces the wireless network and improves application reliability.
- Smart clients can integrate with backend game servers and peers (both wireless peers and Internet peers) using various protocols.
- Smart clients support rich user interface (UI) features crucial for visually appealing games.
- Smart clients can access mobile-specific network (e.g., SMS and MMS) or device extension (e.g., GPS) features. This makes it possible to develop games that take full advantage of the mobile lifestyle.
- Smart clients offer stronger and more flexible security through advanced encryption and digital signature algorithms. With smart clients, it is possible to transport sensitive user privacy data over the Internet and build effective online societies.
A portable platform
Compared with other smart client platforms, J2ME has a unique advantage: it is designed for mobility. J2ME applications run on various devices from numerous vendors. That is extremely important in the highly competitive mobile device business due to the large number of different devices. All major smart phone manufacturers have committed to support the J2ME platform. Code portability is crucial for developers who want to maintain a single codebase yet still reach the maximum number of consumers.
J2ME solves the "lowest common dominator" problem, which has plagued desktop Java before, by defining a multilayer architecture consisting of configurations, profiles, and optional packages. So far, in the mobile game industry, the most popular J2ME platform is Mobile Information Device Profile (MIDP) and the optional packages built on top of MIDP. In this article, I focus on the MIDP v2 platform.
Figure 2 shows the J2ME architecture.
Since J2ME applications are portable across various devices, they are often downloaded and executed over the network. Without proper precaution, that can open enormous security risks for both users and wireless carriers. Fortunately, Java is a secure language by design. All byte-code applications are verified before execution; the JVM monitors the applications for security and memory violations during the execution. The MIDP v2 runtime includes a fully featured, domain-based security manager that grants API-level permissions to applications based on the identity of their digital signer.
Thanks to J2ME's wide adoption, mobile Java developer support has grown into a sizable market. Almost all popular Java development tools have been adapted to fit J2ME developer needs. J2ME libraries and components are readily available from third-party providers. Many of those libraries provide similar features to their Java 2 Platform, Standard Edition (J2SE) counterparts. For example, the IBM Service Management Framework (SMF) supports Java servlets on PDAs; the PointBase Micro Edition provides a Java Database Connectivity (JDBC)-like access method for mobile relational databases; and the IAIK JCE-ME supports a lightweight version of Java Cryptography Extension (JCE). Those tools and libraries make it easy for J2SE developers to migrate their skills to the mobile world. In turn, that creates a large developer base for J2ME vendors to leverage. The positive feedback cycles will help J2ME's growth.
A survey of APIs and tools
In this next section, I survey J2ME game-related APIs and examine the capabilities they provide for developers.
The MIDP runtime provides fine-grained controls over the mobile device's screens and hardware keys. All MIDP UI classes inherit from the