Skip to content
Archive of posts filed under the BlackBerry10 Development category.

Fixing games for the BlackBerry AppWorld

I have fixed the games I submitted to the BlackBerry Game-Port-A-Thon. I had many bugs reported by the AppWorld team that occurred only on the BlackBerry DevAlpha device, but not on the simulator. It seems that the DevAlpha is very important tool, if you want to develop for the upcoming BB10 phones.


This one was the trickiest. I don’t own a DevAlpha, and yet I developed for it. The game seemed to work really well on the simulator, but it didn’t  work as well on the real device. Luckily I got some images from the BlackBerry AppWorld testing team to help me with my development.

FreeJeweled running on DevAlpha device. ScreenShot provided by BlackBerry AppWorld team

FreeJeweled running on simulator. In here the menu bar is perfect

As you can see the game worked really well on the simulator, and badly on the real device. At first I thought that  my problem was that the size of the menu bar buttons is based on the jewel size from the  game, and those values came from c++ engine. I thought that maybe there’s some very strange timing issues or something… and that’s causing the qml side ending up with some strange default values. My first attempt was hardcoding the button sizes, but I still got rejected from AppWorld, and they told me that it still looks just as bad.

The FreeJeweled is using custom fonts which are packaged into the application itself. My second guess was that the fonts are not working in the same way on the real device as they are on the simulator. This time I had help from a friend with BlackBerry DevAlpha to run some tests for me, and it turns out that the problem was with the font behavior. I blindly changed font sizes on my code, and sent a package for him to test, and after couple of packages we finally got it right.

Continue reading ‘Fixing games for the BlackBerry AppWorld’ »

BlackBerry Got Game Port-a-Thon

Last weekend I participated to the BlackBerry’s Got Game Port-a-Thon even. It was a 36 hour event,  and the goal was to submit as much games as possible to the BlackBerry’s app world.

The new BB10 OS has a tool to repack Android and HTML5 applications, so I expected that most of the participants will do just that. The new BB10 is Qt based, so I thought that porting existing Qt apps is probably quite easy, but it’s not as straight forward as repackaging old apps, so I decided to do just that (hopefully less competition with this approach). I ported few QWidget and QML based apps just for the fun ;-)

Porting Qt apps with BlackBerry 10 NDK

I had 36 hours time to port apps in an environment that I had never used, so it was really important to learn how to use these new tools quickly. Luckily I can say that the BB10 native SDK is really good! The whole SDK is build on top of Eclipse based UI, and that’s pretty easy to use. It has a lot of project templates to choose from, and creating new installation packages from “file/export” is really easy.

The BB10 simulator is basically a x86 compiled image of the Operating System running on VmWare! This is how you should create all of you simulators. I’m looking at you Android. Booting up the simulator takes only few seconds, and launching new apps on the simulator is really fast.

Locking the orientation in BB10 apps is quite easy. Just add these few lines into the application bar-description.xml file.


The NDK isn’t perfect, it has at least one strange “feature” on it. if you’re using console.log(); in your qml file, the log output doesn’t go into the console, instead it goes into the terminal. You can view the terminal output by right clicking the simulator connection, and clicking “SSH connect”. In the SSH connection window you should type

slog2info -w

36 hours is not much time, so I wanted to make a simple quick process to port new apps. Here’s the process that I used

  1. Create new Cascades based project from the BB10 project templates. This way I got all the necessary Qt-library dependencies into the bar-description.xml file
  2. edit the bar-description.xml and add author name, application description etc.
  3. add qrc-file as a resource to the projects .pro file( I used resource-file, since it’s more portable)
  4. remove main.cpp and app.cpp files from the project( I’m going to use the original sources instead)
  5. add all sources and resources from the project that you’re porting
  6. compile & link
  7. debug, hack, debug, etc.