
|
November 24, 2004 |
|
|
Brownbear Mobile Games in Singapore was one of the winners of the Sony Ericsson Game Developers Challenge 2004. The immediate impression made from ARES II is the action and number of moving objects. How did Brownbear succeed in implementing all that in the relatively small environment (compared to game consoles and computers) that a mobile phone represents? We asked them to tell the story behind ARES, including tips based on their own development experience.
The idea and inspiration Getting from MIDP 1.0 to 2.0 1. Processing speed; most MIDP 1.0 devices are too slow for the game's higher levels (there are up to 100 simultaneous enemies). 2. Audio; the sound playback was not smooth. With MIDP 2.0, GameCanvas and sprites could be used that eliminated much of the previous, low-level code for game graphics and manipulations. The porting to MIDP 2.0 was actually done quickly. The K700 hardware platform (one of the target phones in the Sony Ericsson Game Developers Challenge 2004) is very efficient in handling all the graphics and audio files that the game pushes on it. The initial design philosophy of ARES II was to have one single build for all J2ME MIDP 2.0 phones. During the design and coding phase, extra effort was put into making the code intelligent enough to automatically: 1. Detect and resize to the current device's screen size (like vector graphics). 2. Calibrate according to the hardware platform's processing speed. Both these targets where reached and the game self-adjusts to all screen resolutions on the market today. However, point 2 of calibrating to speed, was not implemented in the commercial game, but was taken out because of usability concerns. The self-calibration for processing speed took two to three minutes, something that initially gave the mobile user a bad impression. Optimizing code 1. Avoid generating too many class files, since it inflates the size of the jar considerably. It's against the best design rules of OOD (Object Oriented Design), but in doing so you can save a lot of memory usage during runtime. 2. Optimize functions to be re-used. For instance, ARES has one dialog-box method that is used in almost 90% of the game. 3. Graphics should also be designed for re-usability. Try to use tiles and sprites optimized to have less than 255 colors. 4. Avoid using drawString to the canvas as it consumes too much CPU. Instead, create an image and draw the string into the image during initialization, for example, by using scoreText textlabel in your constructor method: stringImage = Image.createImage( font.stringWidth( scoreText ), font.getBaselinePosition() ); 5. Avoid using synchronized methods since object lock needs to be obtained and they're the slowest. Use final static methods where possible, they're the fastest.
public void run() { . . . } }
Tan Wei Wei, Business Development Manager of Brownbear, says: Below you can see images of the ARES II game on a number of Sony Ericsson phones, using the device emulators in the Sony Ericsson J2ME SDK.
Brownbear Mobile Games is located in Singapore where the number of game development companies is small but growing. Thanks to Brownbear's location, there are a number of Chinese versions of their games and this is also true for ARES II. The game has been ported to Simplified Chinese and Traditional Chinese (some example shots are provided in the image below). Brownbear also has the capability of creating games with a Japanese or Korean language interface if required.
| |
Copyright © 2001 - 2009 Sony Ericsson Mobile Communications AB. All Rights Reserved.