Summary
Mobile games have made remarkable achievements and become one of the fastest growing parts of the IT industry. In this article, the author Michael yuan focused on analyzing the characteristics and current situation of this exciting new market for Java developers. Java 2 platform, micro version (j2s) is the main technology platform for the next generation of multi-player mobile games. In the second half of this article, Michael also outlined the latest game-related technological innovations and the latest APIs in the j2's world.
Looking at the history of the IT industry, computer games have become one of the driving forces behind technological innovation. Computer gamers are eager for more powerful hardware computing capabilities; they are eager to be free from the constraints of different software-whether it is to force graphics on artificial intelligence (AI) or network security. Game Developers and players are often the first contributors to cutting-edge computer technologies. Thanks to their innovative days, gaming is no longer a technology product controlled by large procurement companies-the gaming field always has plenty of room for individual innovators who are talented in this field.
As technology promotes gaming experience, the gaming market continues to grow. The commercial IT revolution saves us time and money, thus improving our work level. Therefore, we spend more time and money on games to improve the overall quality of life. Even in today's difficult economic age, gaming continues to grow rapidly and is still part of the profitable industry. Java developers should note that there are huge business opportunities.
As the rest of the IT industry, the latest hot spot in the gaming industry is mobility. Mobile Games will come from traditional commercial companies (such as Sun Microsystems's new game zone), equipment manufacturers (such as Nokia's n-gage and Qualcomm's brew devices) and those merchants that were originally unable to get together with network operators (such as Vodafone's content service.
As a Java developer, we are very suitable for entering this profitable new industry, because Java 2 platform, micro version (j2s) is one of the most widely supported mobile gaming platforms. In this article, I will discuss the business opportunities and challenges of mobile games from the perspective of Java developers. I will also look at the art-level mobile Java Technology in the important j2s specifications.
Mobile game features
Mobile games are mainly profitable because they involve a wide range of products. Mobile phones are already tightly integrated with modern lifestyles. They are second only to keys and wallets among the most commonly carried personal products. Traditional desktop games target low-level fun people and teenagers, while mobile games are accessible to everyone-anytime, anywhere. Although each mobile game is not expensive, the huge amount of use (for example, each person has a new game every Monday) will make this market opportunity unlimited and profitable. However, for developers, it is very important to migrate console games to mobile game projects because the objects, lifestyles, and distributed models they are targeting are very different. Let's talk about the needs of mobile games.
Requirement
Most successful mobile games have the following features:
· Easy to learn: Since mobile games are intended for ordinary consumers rather than computer experts, it is impossible for them to thoroughly learn game skills. Consumers will not spend hours researching a game with a $3 manual operation. Therefore, a game can be played as soon as it is downloaded. Keeping the game simple is the most basic requirement.
· Testability: multitasking is a basic feature of mobile lifestyle. Mobile phone users often have a short period of time between tasks (such as waiting for an email or waiting for a car. Games, calendar management, communication, and work data access use the same device. Therefore, a good mobile game should provide a short period of entertainment, and allow users to switch smoothly between the game and the working mode.
· Subscription-based: the success of mobile games depends on their huge usage. Developing and designing each game at the beginning is expensive. If a mobile game developer wants to make money, the important thing is: the same game engine, multiple titles, and the basic storyline is similar. Subscription-based games are the best way to continuously generate revenue.
· Rich social interaction: No matter how well a game is designed, players will soon get bored if they find its fundamental model or finish all the game paths. For a subscription-based game, it is important to work with other players to enhance the intelligence and randomness of the game. In today's complex multi-player games, games with rich social interactions prove successful.
· Advantages of mobile phone technology: the huge R & D cost of mobile phone technology is spent on improving the availability and reliability of devices and networks. As a result, mobile device hardware and network protocols are associated with the desktop/console world (such as GPS extensions, bar code scanners, and short message services (SMS)/Multimedia Information Services (MMS) communication. Good mobile games should take advantage of the features of updated devices and the advantages of basic network devices.
· No illegal content: Since all age/gender groups play mobile games and are often in public/work scenarios, you should avoid obvious violence or pornography.
Types of mobile games
Based on the above standards, mobile games that are most likely to succeed are temporary games that provide entertainment for a wide range of players in all social scenarios. In particular, the following types of games will be the most lethal games tomorrow:
· Multi-player games: these games provide mobile access to build online game groups. Or they use mobile phone proprietary features such as multimedia communication and location-based services to create completely different social structures. Good game design and management are the key to the success of such games.
· Content-based games: these games deliver copyrighted multimedia content, such as celebrity pictures, video clips, audio and stereo, and private sports programs for those music, movies, and sports fans. The key to its success is to provide high-quality content streams worth subscribing.
· High-impact video games: PC and desktop games have evolved from 2D to 3D. Mobile Games will also follow this trend. Now the 3D toolbox and receiver of the mobile phone are displayed. However, 3D is very resource-intensive. They require developers and graphic designers to be expert-level. Professional stores are most likely to develop these games.
In the early days of mobile games, most developers were enthusiastic about devices, learning skills, and quick research. However, as more developers join the industry, mobile games have evolved into dominant products involving professional designers, constructor, developers, product dealers, lawyers, and artists. This is an inevitable trend for the industry to become mature. Although it is more difficult for someone to develop and promote simple games in their spare time, more professional stores will provide more job opportunities for many people.
Mobile phone Value Chain
To fully understand the prospects of mobile games, you must understand how funds flow. This commercial value chain is quite different from traditional games or enterprise applications:
· Developers: software developers create great application-driven value chains. However, most developers do not have the ability to handle huge marketing problems. They also lack distributed channels to reach consumers.
· Publishers: game publishers collect issues from developers. They set up trademark names to ensure the correctness of the game technology, upgrade the game, and establish business relationships with wireless communication companies. They also handle account issues from the developer's standpoint. And they are generally shared with developers.
· Wireless communication company: Wireless Communication Company is the center of distribution channels for mobile games. Communication companies not only control networks but also have customer information. Then they decide which devices and services they support. Communication companies take the lead in all their earnings. They also collect payments from customers through existing service agreements.
· Wireless device manufacturer: device manufacturer driving technology updates. They create new hardware and support development platforms. In fact, the success of J2EE is mainly attributed to the adoption of IT by major equipment manufacturers. Equipment manufacturers are independent forces between communication companies and consumers.
· Consumer: the consumer pays for the profits of all providers in the capital and chain. Consumers can purchase games from the publisher's website or through the content supply system provided by communication companies.
Agent
It is considered as the most outstanding mobile gaming platform. It is widely accepted by developers, equipment manufacturers, network communication companies and consumers. It has some very important features that benefit all organizations.
Features of Smart Clients
The agent is smart. They can process information on themselves. The most important features of the difference between a smartphone and a previous generation of mobile phones are:
· For users, the most attractive feature of smartphones is that they can play games without being connected to the Internet. Online mode is necessary in today's 2-2.5G network. However, in this network, there is very little coverage, and data communication is expensive. Caching data and request network operations to transactions can also significantly reduce the use of wireless networks and provide application reliability.
· Smart Clients can use different protocols to integrate backend game servers and their same-bit bodies (including wireless and Internet.
· The Smart Client supports a wide range of user interfaces (UIS) that are crucial to the high impact of visual games ).
· Smart Clients can access mobile phone-specific networks (such as SMS and MMS) or device extensions (such as GPS) features. This makes it possible to develop games that fully utilize the advantages of mobile lifestyle.
· Smart Clients provide more powerful and flexible security through advanced encryption and digital signature algorithms. With smart clients, we may transfer sensitive private data over the Internet and establish an effective online society.
Portable platform
Compared with other smart client platforms, j2-has a unique advantage: it is designed for mobile phones. The applications run on different devices of different investors. This is particularly important in the highly competitive mobile device industry, because there are a large number of different devices. All major smartphone manufacturers acknowledge their support for the J2EE platform. Code portability is crucial for developers who want to maintain a growing number of consumers for a single code library.
It solves the "lowest public ruler" problem, which has been plagued by desktop java before. The problem is solved by defining a multi-layer structure including configuration, configuration file, and optional software packages. So far, in the mobile gaming industry, the most popular j2's is the mobile platform device configuration file (MIDP) and the optional software package created on MIDP. In this article, I will focus on the MIDP V2 platform.
The reason is that the applications are portable on different devices and can be downloaded and executed on the network. Without proper prevention, it puts users and wireless communication companies at numerous security risks. Fortunately, Java is designed as a secure language. All bytecode applications must be verified before execution. JVM supervises application security and storage violations during execution. The MIDP V2 runtime includes a fully-characteristic domain-based security administrator who grants API-level permission to the application based on the application's digital signer identification.
Due to the wide use of j2's, mobile Java developers have grown into a very large market. Almost all of the popular Java development tools have been transformed to meet the needs of the Java developers. The j2's libraries and components from third organization providers are easy to get. Many of those libraries provide similar features for their Java2 Platform Standard Edition (j2se) counterparts. For example, the IBM Service Management Framework (SMF) supports Java servlets on PDAs. The pointbase micro version provides methods for mobile phone-related databases similar to the Java database connection (JDBC) method; iaik JCE-ME supports a lightweight version of Java cryptographic technology extensions (JCE. These tools and libraries make it easier for j2se developers to transplant technology to the mobile phone industry. Correspondingly, he also provides a large number of developer sources for investors in the field. This kind of virtuous circle will contribute to the growth of J2EE.
Overview of APIs and tools
In the following sections, I will give a general overview of the game-related APIs of j2's and test the functions they provide to developers.
User Interface
The MIDP running time provides fine-grained control over the screen and hardware keys of mobile devices. All midp ui classes are inherited from the javax. microedition. displayable interface:
· The Screen class is the basis for advanced small devices such as alert, list, form, and textbox. The MIDP runtime controls how advanced UI classes are displayed and how function keys are arranged based on the UI conventions of special devices. MIDP advanced UI mini devices are most suitable for text control. In advanced UI classes, form classes are the most flexible. You can specify the form screen layout and add something to it, such as stringitem, textfield, datefield, choicegroup, and gauge.
The MIDP V2 specification brings two important innovations into the advanced UI: First, it introduces spacer and imageitem to allow mixed text and image display on the same form; second, he introduced the customitem class to provide developers with a mechanism to design and implement their own item-level window small devices. Developers have final control over customitem objects, including pixel-level painting and internal event processing.
· The canvas class is the basis of the low-level midp ui. It provides access to pixel-level painting on the screen and custom ing for all hardware keys. You can only create a subclass of the canvas and skip the paint () method used to display the logic; The keypressed (), keyrepeated (), and keyreleased () Methods used for key events; the pointerpressed (), pointerdragged (), and pointerreleased () methods are used for the indicator and touch screen in each event.
· The gamecanvas class inherits from the canvas class. He is part of the MIDP V2 game API and provides a convenient mechanism for game development. For example, in the gamecanvas subclass, you do not need to skip the painting () method every time you modify it to depict the entire screen. You can obtain a graphics object directly from the getgraphics () method and draw a graph on the object. When you need to update the display, you can call the flushgraphics () method. However, you can use the flushgraphics () method to update only a portion of the screen. Compared with the single method of the canvas class, the gamecanvas class makes it easy for us to maintain the graphical state and quickly update the animation part of the screen. Similarly, the gamecanvas class uses the getkeystates () method opposite to the call-back method in the canvas class, which provides a convenient way to obtain the key state. This makes execution of complex game screens more flexible.
The MIDP V2 Specification defines a complete API for game applications in the javax. microedition. lcdui. Game software package. In addition to the gamecanvas class, he also provides a layer class that supports tiled or animated game background images. The game API also provides sprite classes for processing animated images and conflicts. They are basic components in 2D graphics games. At the forefront of 3D, java standard request (JSR) 184 tried to standardize Java 3D APIs on mobile phones. It has made excellent improvements. The j23d tools required by developers and artists are now available in superscape (see resources. Large device manufacturers are rapidly changing their high-end smartphone devices to support this new API.
Figure 4. Java 3D games available from superscape
In addition to the standard midp ui and game APIs, there are several other midp ui toolboxes. They either provide proprietary features of the device or aim to support a better advanced UI that can boost game development:
· The Nokia UI Software Package controls the sound, brightness, and Vibration Components on Nokia mobile phones. It also supports full screen mode for more professional games.
· Motorola light and small device Toolkit (lwt) is an independent Window Toolkit for Motorola mobile phones.
· Nextel open runtime wing Toolkit (owt) is an open source toolkit jointly developed by Motorola and Nextel. It runs a container model to control layout and other UI components, which is familiar to desktop UI developers. OWT is based on the canvas class and runs on all MIDP mobile phones. However, if you use the owt library, you must include it in your distributed MIDlet group.
· The synclast UI project has developed an open-source UI software package that supports container models. Based on the MIDP V1 canvas class, it supports many MIDP V2 small devices. Therefore, it allows the MIDP V2 application to run on the MIDP V1 device today after a slight modification. With owt, you must bind the synclast library to a distributed application.
In general, the MIDP platform provides multiple options for a wide range of UI games.
Network and background Integration
As I mentioned earlier, the future of mobile games is a networked multi-player game. The networking in j2's can be supported through the general connection framework (GCF. The core of GCF is the factory class javax. microedition. Io. connector. You can pass a protocol and address string to the static method connector. open () to obtain the connection object on the remote host:
· HTTP support is mandatory in MIDP. If you pass the http: // hostname: port connection string to the connector. open () method, the httpconnection object is returned. You can directly open the input/output data streams on the connection and write/receive data from the remote host/remote host.
· UNIX sockets, user self-Addressing protocol (UDP) connections, or direct TCP/IP connections are also supported in some implementations. However, you should note that there is a fundamental difference between a mobile phone network and a wired Internet. Some networks simulate socket connection at the beginning of the HTTP layer. Therefore, direct sockets do not need to increase performance. In most cases, HTTP is recommended.
· The j2mwireless communication API (WMA) supports SMS Communication between mobile devices in GCF. You can send SMS messages to another mobile phone through the messageconnection object obtained by SMS: // phone_number: port. You can also open a "server" connection, which can use the SMS: // port string to listen to the incoming SMS information. The incoming SMS information can be processed synchronously or asynchronously.
· In MIDP V2, the "server" SMS connection can be registered using the j2e-runtime management. It allows developers to call Information Processing MIDlet on the arrival of a certain information.
At the protocol level, j2s' support for several methods to transmit structured application data:
· The MIDP datainputstream and dataoutputstream classes support Java's convenient I/O methods (such as writeint (), writeutf (), writefully (), and the corresponding readxxx () method) (not) serializes common data values and objects. The writexxx () and readxxx () Methods on both sides of the communication channel can greatly simplify developers' work and increase the terminal application strength of the terminal.
· If you need more structured data exchanges, the MIDP platform also supports several XML Parser types. The XML Parser supports Simple APIs (SI) for lightweight Document Object Models (DOM) for XML (SAX), xmlpull, and parsing examples ). JSR 172 (j2's Web Service Specification) is developing a standard XML Parser API for j2's.
· A Web Service Based on the Simple Object Access Protocol (SOAP) is a terminal-to-terminal integration model in the future. The J2EE platform is well set. You can use the third-organization toolbox such as kSOAP (see resources) and Standard APIs such as JSR 172 to support soap information exchange.
Data Management
Data management on devices is the core feature of Smart Client games. The following fields are strongly supported by J2EE:
· The standard data persistence Device on MIDP is the record storage management system (RMS ). RMS stores binary data (in bytes) in linear records ). It does not allow Random storage or any hierarchical data structure. However, it provides search storage and the restriction function for sorting search results. RMS is mandatory among all MIDP devices. It is sufficient for most purposes. However, MIDP itself does not provide APIs for synchronizing RMS Data Using Background applications. JSR 230 (Data Synchronization API) is just starting to develop this synchronous API.
· JSR 75 (an optional PDA software package for j2m's) Provides protocol independent multi-point transfer (PIM) applications (such as calendar, Address Book, email and task list) for local devices) and file system access. Pim data and files can be synchronized to a desktop computer through the local synchronization device group of the device.
· For more complex data, you can use the mobile database. Several commercial MIDP databases (including related databases and object-oriented databases) and synchronization engines are available on the MIDP platform (see "high-availability mobile applications" (javaworld, June 2003 )).
Multimedia
Multimedia replay is vital to content-driven mobile phone entertainment applications. JSR 135 is a standard framework used to play multimedia content in j2s. The player interface enables you to play multiple audio and video formats from multiple data sources. You can specify the content format for the multi-purpose Internet Mail extended protocol (MIME) type that is passed to gamers during running time. Each device Implementation of multimedia API supports a set of different MIME types that depend on hardware and local player functions. Currently, almost all devices compatible with multimedia APIs support simple stereo playback. Support for more mature formats such as MP3 audio, 3GPP video, and even MPEG4 video is coming soon.
Security
Mobile Games involve downloadable code, copyrighted content, and financial transactions. Security is critical to protecting the interests of users, developers, publishers, and communication companies. In multi-player games, some users try to break into the system by cracking down the security breakthrough. At this time, security is particularly important. It provides excellent support for application and communication security:
· MIDP V2 specifications support the use of application tags for the developer or issuer's digital certificates. Based on the identity of the signatory (security field), the runtime security manager can grant the application API-level access. For example, applications with low source trust do not allow network connection or sending SMS messages.
· MIDP V2 specifications also require support for HTTP on all mobile phones. This provides a foundation for secure information exchange on the Internet.
· If connection-based HTTP is still not flexible enough for some applications, many third-party cryptographic technology packages are also available on the MIDP platform (see "Data Security in Mobile Java applications" (javaworld, december 2002 )). They allow encryption or signature of binary fragments of information.
· JSR 177 (security and trust API for j2's) is a standard access to a hardware Security Unit (such as a SIM card) in the embedded device. For example, it allows the j2s' developer to retrieve the digital certificate stored on the SIM card or use the encryption algorithm of the acceleration hardware.
Supply and Marketing
The transfer of mobile games to consumers is a complex process involving many organizations. The MIDP Specification includes the over-the-air (OTA) provision. It depicts how to download the MIDP game over a Wireless Application Protocol (WAP) network, and how Java application management software (AMS) should install the application and enable it to be used by users. The OTA process provides a feedback mechanism for the client device to report the installation status to the server. It provides a technical basis for more complex business configuration processes. In the business field, you should consider the following important additional processes:
· Applications must be authenticated as antivirus and placed in the directories supported by communications companies.
· Different client devices should provide different jar files at the same time, which can maximize the use of device functions (graphics and installed optional software packages ).
· The customer's payment and the payment to the developer must be processed seamlessly. It is particularly important to directly click the payment system in the mobile phone.
Several commercial supply solutions are already feasible for communications companies and publishers. JSR 124 (Java 2 Platform Enterprise Edition (J2EE) Client supply Specification) attempts to standardize those solutions by defining a general J2EE framework for client configuration. The plug-in program for different OTA specifications, Customer tracking modes, and payment services has been developed and designed and can work in the framework at the same time. This achievement is also critical to the commercial success of the game.
Running games
In this article, I explain why multi-player mobile games with random content are the future of the gaming industry. Mobile device manufacturers have seen this huge business opportunity and have pushed devices to be designed for mobile games (such as Nokia N-gage ). j2-midp is one of the most important technical platforms for mobile game devices and smartphones. After reading the complete text, you should understand the advantages and weaknesses of j2's in mobile games. In addition, I introduced the key game-related technological innovations in MIDP V2 and its optional software packages.
About the author
Michael yuan is the author of Enterprise J2EE. He frequently writes and gives speeches in the fields of J2EE, J2EE, and mobile enterprise applications. Currently, he leads a group of people to build an application blueprint series for the Nokia development platform.
This article translated from: http://www.javaworld.com/javaworld/jw-11-2003/jw-1107-wireless.html?