Porting J2ME games to Flash Lite
Similarities in Porting Flash Lite 2.0 and MIDP 2.0
Flash Lite and J2ME are similar in many areas, and it is these similarities that make the process of porting between the two platforms much easier. Here is a list of the characteristics both platforms have in common:
- Both the technologies are based on the Symbian OS. This means a J2ME game and a Flash Lite game both run on top of the device UI layer. Just as J2ME has external APIs to access the device functionalities, Flash Lite has its FSCommand functions to communicate with the device.
- Most Series 60 devices have a screen size of 176 X 208. J2ME and Flash Lite can maintain this screen size for their game during the port. The screen size issues usually occur only if the game that is being ported has a higher resolution in J2ME compared to Flash Lite.
- The user interface of every Series 60 device has two soft keys, a five-way rocker, and a numeric keypad. This makes it much easier to map the keys in Flash Lite from J2ME to initiate game actions.
- Both J2ME and Flash Lite support menus, although in J2ME, a menu structure can be altered, (which is not true in Flash Lite). Pressing the left-hand softkey, (usually named Options), activates a menu on any S60 device.
- Both technologies use the numeric keypad to enter data in text fields and to navigate through applications. On Series 60 devices, one-hand operation is the key rule. The user is able to do almost all tasks with one hand, by pressing the keys with the thumb. Characters are entered with multiple key presses in both cases.
- The preferred final compiled file sizes of the game (the .jar and .swf files) of both these technologies should be between 250-300K. A developer can build games that are up to 500K. However, be aware that the game could potentially lose revenue if the end user opts not to wait for the large game to download.
- The preferred sound implementation on both these technologies is the MIDI format. Flash Lite developers could also use MP3 and WAV sound formats, but MIDI is the sound format of choice because the goal is to decrease file size whenever possible. If the game's file size allows for extra room for improvement, developers tend to use this as an opportunity to add more graphics or code.
- A J2ME file requires JVM (Java Virtual Machine), also known as a KVM (Kilobyte Virtual Machine) for mobile devices. KVM is a platform optimized for small footprint consumer devices, to execute .jar files. A Flash Lite file requires a Flash Lite Player, a desktop Flash Player profile (based on the Flash 7 engine), installed on the phone to play back the .swf files.