The Story of Possibly the First Branded BlackBerry Game

Comments

Frogger BannerFrogger was the very first game Magmic ported to BlackBerry that was not originally designed and developed by Magmic. It was also the first one I did and it may have been the first branded J2ME game ported to BlackBerry. It was interesting from a number of aspects, which I’ll delve into, but it was a personal success for me as I managed to port the entire game in less than a week (granted, many, many hours over-and-above regular working hours that week); which seems more impressive now after I’ve seen so many porting efforts and how long they can take.

Frogger was delivered by KONAMI as basically one source code file and a couple of binary resource files; with no other documentation. The code was originally written by someone in Japan (or at least that area of the world). I could tell that it was originally written in a UTF-16 character set and delivered to me in a UTF-8 character set because ALL the comments in the code were block characters (you know, the character windows subs in when it can’t find the ASCII character the file is specifying?). So effectively it was uncommented code with no documentation.

Not only that, but none of the variables were named in English words that made sense for their purpose (i.e. variables for width Frogger Screenshot 1were not ‘width’ or ‘w’ or anything resembling that).

In the end, I probably could have re-written the entire game faster than porting the code however we needed to know how much work porting would be for future efforts and wanted to be sure all the intricacies of Frogger were genuine and without full documentation on that, it’s better just to port the game engine over and change as little as possible there to maintain the game ruleset.

The first step was figuring out what the variables meant. This was a long, painful process of modifying values, re-compiling, running the app and seeing the effects of the changes. After repeating this over and over again, finally, most of the variables were named sanely and documented.

By this time, I had a pretty good understanding of the code layout and design (you can’t rename virtually every single variable and NOT know that!) and could start working on translating BlackBerry input to the basic commands used by Frogger. Since Frogger is such a simple game, it basically uses the four directions (up, down, left, right), an action key as well as a key designated to go back.

Translating the BlackBerry input wasn’t as simple as simply mapping various keys on the keypad to the actions the game expects as the BlackBerry platform (at the time) had two main navigational hardware mechanisms that users were comfortable with. The traditional wheel on the right-side of the device and the brand new ball located right below the keyboard. I was actually working on the ball before the BlackBerry Pearl was actually released as Magmic was privy to pre-release devices and information via our participation in the BlackBerry Alliance Partner program.

To make the game feel great for BlackBerry users, I didn’t want them to have to resort to using the keypad on the device as users were familiar with, and comfortable with, using the wheel and ball for general navigation.

For the wheel, I chose to leverage the ALT key to swap the directionality of the wheel. This was consistent with the BlackBerry OS usage of the ALT key and wheel so users would not have to learn anything new. The most frequent actions the users would be taking would be moving left and right so I set the default up/down on the wheel to map to left/right (respectively) in the game and then when the user held down the ALT key and rolled the wheel I switched to sending up/down actions.

For the ball I had to decide if I would take advantage of the momentum functionality which is when you roll the ball fast, you can detect that and respond my scrolling further in your application. After playing around with it and testing the effects, I decided that it was too difficult to control the frog if momentum was enabled so I just moved the frog one space in the intended direction no matter how fast the ball was moved.

The last major effort was re-working the layout on the screen to support the “high resolution” BlackBerry devices. Resolutions of 240×260 and 320×240 were considered quite large for the time and since the graphics for the game were designed for smaller Frogger Screenshot 2resolutions, I needed to adjust the layout for the larger screens and ever re-create or re-size various graphics in the game. This would not be a huge challenge; if all the graphic resources were in standard formats. However, all the graphics were packed into a proprietary binary format (which of course, had not documentation) so I had to reverse engineer that format using the code in the game that loaded all the images, separate all the graphics into individual images and get our Art team to update them for me for the new resolutions.

In the end, I ended up with a very faithful recreation of the J2ME game on BlackBerry and started to build up a wealth of knowledge (to be vastly supplemented while working on future titles) on the best and easiest ways to translate J2ME code into code leveraging the BlackBerry specific APIs.

In future articles I’ll talk about some of the other games I worked on and some of the unique challenges they had but Frogger will always hold a special place in my heart and, I think, in the industry as the first branded BlackBerry game. Its success (and it was very successful) was a harbinger of the future of BlackBerry gaming.

(Images courtesy of an OLD copy of the Magmic.com website. Thank you web.archive.org!)

BlackBerryCool Editor: This article comes from Jeff’s new blog. The blog currently focuses on BlackBerry, and specifically some stories from a developer perspective. Jeff has worked in the BlackBerry gaming space for many years and we highly recommend checking out his articles. Keep an eye on this man.

You may also remember Jeff from his “Bacon on BlackBerry” articles.

  • http://twitter.com/Hardened Hardened

    Great article, really enjoyed reading this!

  • http://www.medicaltranscriptiontraining.in/ Medical Transcription Training

    Ok this was the story behind it.Great blog, this could be the best blog I ever visited this month. Never stop to write something useful dude!.

  • Mark Rejhon

    Very good article. I remember the developments at Magmic, having had work at Idokorro (RoveMobile) just across from Magmic’s offices in the Ottawa Market area.