Nokia mobile phone-based mobile game development boboto (b)
Nokia phones to support new models of the game may affect the shell game action. You can use Nokia's first mobile phone shell game is Nokia 3510i. If the phone supports shell game, equipment in the game menu there is a Settings dialog box that allows users to set the game cover the corresponding button on the game action. Users must set up the button mapping, otherwise the general keyboard layout design will not be able to run the game.
4 At the same time, key
Many Nokia mobile phones (for example, Nokia 6310i, 3410,7210) do not support more than at the same time press the button (that is, if you hold down the Up button, then the MIDlet will not know if you press the Fire button). Although the Nokia 7650 supports multi-button press (for example, at the same time hold down the "1" and "3" key), but the joystick button is not physically at the same time, according to another up by the left, so the game can not be inclined to the movement, and it has been up, down, left or right when the press can not record a "click" the.
5 key name: to avoid your own hard-coded text string
Avoid hard-coded text and in your MIDlet code associated with the keyboard. Canvas class provides a return code associated with each of the keyboard method of text name:
public static String getKeyName (int keyCode);
The Nokia devices are now the problem is that this method always returns an English string, rather than based on the user's language choice. Nokia devices in the future, this string may be based on the user's language of choice. If your goal is to develop portable gaming, then it must be remembered that different getKeyName in Nokia MIDP devices back to a different value.
6 using the full-screen canvas (FullCanvas) function keys
A full-screen on canvas (FullCanvas) game screen function keys can only be used from the game screen to a different screen from the state. FullCanvas category with the Nokia user interface application programming interface to provide a clear area full-screen graphics for mapping, can be used for many types of games.
Succession in the Nokia user interface application programming interface of the game screen FullCanvas category will not be the function keys of the keyboard code (that is, KEY_SOFTKEY1, KEY_SOFTKEY2, KEY_SOFTKEY3) used for game-related action, except for the screen from the game to return to the menu.
If a MIDlet applications need to use the function key commands, you must use the default of the MIDP Canvas class, especially if you need to use the MIDlet when the function key labels. When you use FullCanvas, you should not provide your own function key labels.
7 MIDlet international
You may need to put your MIDlet international - for example, for different regions and languages. The MIDP system Properties "microedition.locale" the definition of the current equipment regional. It can use the value of System.getProperty. Way. MIDP specification allows the system to use an empty attribute value. However, in Nokia's MIDP implementation of the null value is not allowed. The CLDC System Properties "microedition.encoding" defines the default character encoding equipment. Its value can be made using the System.getProperty method.
Want to learn more MIDlet localization problem, see "Writing World Aware j2me Applications" http://wireless.java.sun.com/midp/ttips/worldaware/ the Resource Kit. MIDP is also currently not a standard mechanism to deal with Resource Kit. This document means the use of a simple version of the user interface separate from the main program. Resource type it in (b, 9) have been dealing with.
Characteristics of the international is very important to add a MIDlet, but it may increase the size of your MIDlet. If the MIDlet size for a particular MIDP devices is a problem, then you may wish to have several different versions of the compiler MIDlet. Each version for one or more regional, language localization.
8 equipment features: sound, vibration and lighting
If you use Nokia user interface application programming interface type Sound or DeviceControl (vibration, light), you should provide an Options or Settings menu and a set editor, to allow end-users to start or cancel such a setting.
However, if you use Nokia user interface application programming interface type Sound or DeviceControl (vibration, lighting) and by setting the JAD parameters <> to install your games to the Games menu (see I, 11), Games menu has been provided settings allow the end-user to start or cancel these characteristics. Therefore there is no need for their own applications to create such a characteristic. Nokia UI API in addition to technical documentation, you can also refer to "Nokia UI API Programmer 's Guide", it can offer a lot of useful information.
9 device-independent nature of
Nokia MIDP devices may be on the screen size, keyboard layout and the availability of different API and so on. In order to create portable games, game design, these differences should be taken into account.
Applications should be asked to screen size, rendering the screen content and to avoid hard-coded coordinates of the time. Can use the Canvas class and getHeight methods getWidth to achieve this objective.
Nokia MIDP different application programming interface devices varies greatly, developers should check equipment to be developed platform application programming interface. It can be done, vibration is a good example.
| try ( |
Class.forName ( "com.nokia.mid.ui.DeviceControl");
catch (ClassNotFoundException e) (
/ / Can't use vibration because the API
/ / is not supported in the device
The use of inheritance in the MIDP Canvas class default game screen instead of FullCanvas specific types of manufacturers, which helps to improve the portability of your MIDlet; However, it is impossible to realize a full-screen.
MIDP device's memory is very limited, so be careful when using the memory. The game is a very important limitation is the limited memory of the heap (heap memory): To save heap memory, object reference is no longer need to be set to "null", so that these objects may be garbage - collection (garbage-collected). Color screen cell phones need more memory to deal with the application of digital map, which places a greater depth of the screen and the related internal data structure. Thus, although the possibility of preparing an application to use in a black-and-white cell phone screen, but the use of mobile phones in color, it may consume more dynamic memory: on the Nokia 7210, it showed a picture than the Nokia 6310i 16 times more memory.
Developers in the design of the application should take into account this factor should be loaded at the same time a few picture of the extent of at least reduced. For example, the screen flashing images should be able to create images in the graphics before the game was garbage collection (by setting all the references to the image object to "null").
By default be installed MIDlet to the Nokia devices under the Applications menu. If the device is there, then Games menu, MIDlet can also set the MIDlet's. Jad files in the Nokia-MIDlet-Category: Game parameters to install to this menu.
Author: wayne compiled since posted: yesky.com
Game Developer Tutorial Articles
- game engine
- Nokia mobile phone-based mobile game development boboto (b)
- World of Warcraft on November 23 will begin selling
- The heroes from Warcraft to devise a mechanism to pry into the idea of object-oriented
- Why Shanghai grand success? (5)
- Bird Cup Software Design Competition awards mobile phone results
- Quake source code analysis (draft) .4
- Talk about interactive online games. .
- Game On (c) - the game's coat
- DirectX Development Review
- Huge one China, not the book readable
- Shaders and effects - 1.3 Variable types
- Shaders and effects - HLSL shader compiler 1.2
- Shaders and effects - the preparation of HLSL shader 1.1
- Shaders and effects - high-level shading language 1.0 Introduction. Doc
- Shaders and effects - (1) Overview
- Directshow RTP multimedia applications on the network adapter support
- Network Robot (3 )---- robot game development tools and development steps
- Advanced shader language (High-Level Shader Language)
- Legend Chronicle
Can't Find What You're Looking For?
Rating: Not yet rated