Half an year after releasing Mahjong Skies I decided to extend it to different platforms apart from iOS and Android. I saw that MOAI has a basic port for BlackBerry OS 10. I chose to go with an actual device instead of using the simulator for debugging just in case of differences. Here’s my experience with the actual phone, the OS, and the development process.

BlackBerry Z10 phone

The phone looks and feels really cool. It doesn’t feel cheap despite the fact that it’s made of plastic. The back cover is a bit weird to remove but you get used to it. One problem I had with this phone was that it’s trying to connect with multiple MAC addresses to my Wi-Fi (one normal and one zeroed-out 00:00:00:00:00:00) which made my router hang but that could be a defect in my model. Also the battery life is very poor. I never made it for two whole days with this device.

BlackBerry OS 10

The OS looks like a copy of iOS but with design that’s more appealing to me than the latest changes from Apple. You have multiple screens and directories. No widgets or any customisations the way Android provides. Multitasking is great and the notifications’ hub is really easy to use. Calendar and contacts synchronise with Google services which is a great plus. One thing that’s really frustrating is that the OS and the API don’t provide any access to low-level functionality like developing new keyboards or service apps. That’s OK if the OS provided everything one may need but I found that it lacks phonetic cyrillic keyboard for example. Bummer! BlackBerry need to either improve their OS or at least give that ability to developers.

Porting MOAI and using the NDK

As I’m using an open source C++ engine the only way for me to develop for BlackBerry OS 10 was using the NDK. I quickly ran through the examples and saw that the API provided everything I needed (browser invoking, in-app purchasing, dialog windows and native sound support). The OpenGL part was really easy to port. Someone already did most of the hard work. The rest were hacks that were there for Android anyway so I just implemented a few ifdefs in the abstraction to make it work.

Supporting native sound was entirely other thing. Turns out even playing a simple wav file takes two hundred lines of code. Yes, I know you do it once and then use it everywhere but opening the file and feeding it to the sound chip chunk by chunk is absurd. It’s not that it’s hard it’s just bad API design. I finally gave up and used the native mm/renderer.h for music and OpenAL with ALUT for sound.

The rest was okay. Dialogs were easy, browser support, too. There was a bug using the payment service that fails if you change the working directory. That’s a problem because the engine loads all the scripts from an assets directory. There is a workaround where you chdir to the main directory to initialise the payment and then chdir back. Problem is that this bug wasn’t documented anywhere I saw so I had to test line by line the whole engine initialisation to see where the payment fails. I guess this is implemented because you may have downloadable content but a quick comment in the examples or in the documentation would have been nice. Also it seemed to work in sandbox environment and the verification process of BlackBerry apps doesn’t include testing payments so I found all my in-app purchases fail the hard way.

Support and community

The support and the community are pretty bad. I posted my question for failing in-app purchases in the forums and received an answer after two weeks (long after I found the solution by trial and error). The provisioning portal is also really bad compared to the ones I’m used to (Google Play, iTunes Connect and Amazon Development Services). There aren’t any stats for daily, weekly or monthly downloads and purchases. You can request to generate and download a CSV file with statistics but if you need something more advanced you may need to parse the CSV on your own or write some formulas in Excel to make it useful.

Downloads, sales and user reviews

Downloads are okay – I’m doing the same amount of downloads as the ones from Samsung Apps. Sales are not only bad, they are literally non-existent. I haven’t made a single sale for the two weeks the game has been around. I know that it’s more tablet oriented but it should look good enough for people to play it on Z30 devices. Also I haven’t received a single review in the app store despite the fact that I give bonuses for reviews. So porting was not worth it. My only hope is that the platform may catch up at some point.

Conclusion

After doing this experiment I switched to my Android phone again. After putting up with no Viber, Shazam or any interesting game to play and getting used to the keyboard and the swiping gestures I think I’m done with BlackBerry for now. I wanted to implement Facebook, Twitter and Scoreloop to MOAI but given the target audience I think I’ll leave this at lowest priority in my task list.

Advertisements