
|
October 2004 |
|
|
Following our article "Cross-platform compatibility with Nokia UI Classes" in September 2004 that described the Sony Ericsson support for the Nokia UI API, we asked Pocket Panic about their way of porting the Sony Ericsson Game Developers Challenge 2004 winner Nano Kid. Pocket Panic is a small company from Sweden with games available for Nokia phones but until earlier this year had never developed anything for Sony Ericsson phones. The Sony Ericsson Game Developers Challenge 2004 stimulated them to change this and made them decide to port an existing game, Nano Kid, running on Nokia MIDP 1.0 phones to MIDP 2.0 and the Sony Ericsson K700i.
Pocket Panic ported their Nokia UI API based game to a strict MIDP 2.0 application, and did so with surprisingly small effort. With that step taken, Nano Kid has ensured broad device support and future compatibility. Background to the porting decision As David Eriksson, Pocket Panic, states: "We just used common sense to do the job. The core of the process was to fix only one thing at a time until completion. The only guidelines and documents used were the MIDP 2 and the Nokia UI API specifications". However, as you study the details in their process, there's a structure and experience to learn from. The porting steps described at a high level:
It was an obvious advantage to use the Nokia S40 DP2 emulator, as it supports both MIDP 2.0 and Nokia UI API. It meant that the game was actually working throughout most of the process. One feature at a time was converted and tried in an executable game, which made the porting job safe and under control at all times. In the last stage of porting, the Sony Ericsson K700 emulator and a real test device were also used to do the final tests and verifications. Compared to the original development work, the porting job approximately took another five percent of the effort, which was as a small investment for getting significantly broader device compatibility. Costs were also contained by making as few changes to the game as possible. No new assets (except some MIDI songs) were created, and the game's engine was left untouched. The only features really changed in the MIDP 2 version are the code to draw graphics and to generate sound. Porting tips public short convertNokiaUITransformToMIDP2 (int nokiaUITrans) { Generally, an application is easier to port if all device-specific code (such as the calls to the Nokia UI API) is contained in only one class. As an alternative, use a pre-processor to avoid duplicating code. Pocket Panic has managed to make just one MIDP 2.0 build that runs on both Sony Ericsson and Nokia Series 40 phones. Screen size is detected and the game adapts to that. Conclusion The Lead Programmer and Lead Artist for Nano Kid were speakers at Sony Ericsson's developer seminar at CTIA Wireless IT & Entertainment 2004, and shared their experiences from developing for the Sony Ericsson Game Developers Challenge 2004.
| |
Copyright © 2001 - 2009 Sony Ericsson Mobile Communications AB. All Rights Reserved.