Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 72
Registered: ‎03-14-2009
My Device: Not Specified
Accepted Solution

Game development - 2d performance question (9500 much slower than 9000)

after quite a long time I'd like to get a game done and released on all the Java based BlackBerry devices.
Unfortunately  I have been away from active development for quite some time and so I'd be interested in some basic information about the current state of BB up to OS 7 as well as the most popular devices.
Of course I know it's probably a dead end in the long turn but I was kind of forcefully moved away from developing games (due to non business related issues) and I'd love to just get something new out and released on a platform I had quite a bit of experience and success in the past instead of just drowning in the sea of iOS/Android developers.
So ... I'm working on a game using a tilemap for the main display which benefits from a decent framerate. At the moment I only own a Storm 9500 as well as a Bold 9000 and I expected them to be quite similar in performance but the Storm is significantly slower than the Bold.
If I just use a filled rectangle instead of a tilemap, performance increases significant on the Storm so chances are, it's rendering lots of small subsections of a bitmap which causes the slowdown.
My main questions at the moment are:
  • is there any chance there's a way to improve bitmap drawing by a significant amount? F.i. by putting each single tile into it's own Bitmap instance instead of drawing them from a texturesheet where lots of images are packed into a single bitmap (i.e. the opposite usually required for rendering using a GPU)?
  • given the two devices I own are quite a few years old, can I expect the most used (Java based) BB devices are at least as fast or faster than these two?
Thanks a lot for any help and best regards,
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Game development - 2d performance question (9500 much slower than 9000)

Not really being a gamer, I don't think this is going to be very useful, and this is entirely anecdotal, so I would not base your decisions on this, but perhaps this will help.


Regarding the 'power' of the various Blackberry models, you might like to search the internet, looking for the processor used as an indicator of the power.  Java BBs didn't (at least as I understand it) have a graphics processor, so all image processing is done on the main processor.


You will find if you look at this page:


that the 9000 has a 624 MHz Marvell Tavor PXA930, whereas looking here:


your Storm has a dual core CPU with ARM11 400 MHz and ARM9 274 MHz


Using cycles as a comparison, this would mean to me when developing a game, it will run faster on the 9000 than the Storm, because I believe the Java processing is actually all done on one processor, so your painting will be restricted to the 400 Mhz on the Storm. 


My experience is the Bold seems faster than the Storm in general, but I have actually always put that down to the larger screen being slower to draw. 


In terms of processing power, the slowest phone that I think you could develop for is actually the Storm, but in fact I would not bother developing for that.  It has a slightly odd interface system because of the push screen.  So I would ignore that device and just focus on OS 5.0 devices.  To that end, the slowest device is probably the Blackberry Curve 8520, with a 512 MHz processor.  I would get one of these for your testing.  Also the form factor (screen size, keyboard layout) is shared by a large number of other phones. 


In general terms, my brief experience with game processing proved to me that if you want your game to go fast, update as little of the screen as you can.  So use the 'regions' in your paint method to specify exactly which bits on the screen need to be updated.  In my testing, I was trying to have a cursor move round the screen using the trackpad.  If I moved the cursor and then redisplayed the whole screen, performance was extremely slow.  But if i just painted out the cursor from the region it was in, and painted it back in the place it had moved to, I got a much, much smoother cursor action. 

Posts: 72
Registered: ‎03-14-2009
My Device: Not Specified

Re: Game development - 2d performance question (9500 much slower than 9000)

Hi Peter,
thanks a lot for your detailed answer.
The difference in screen size shouldn't matter that much (only ~13% more pixels) but combined with a more than 50% higher clock speed on the Bold it's quite a difference.
About partially updating the screen (i.e. using dirty rects) I'm used to these optimizations as well as to a cached way of rendering tile maps where you only have to update one line of tiles in the buffer and then update the fullscreen with just 4 bitmap blits which I've done much lower spec devices years ago (i.e. released games on Nokias with 96x65 pixel displays Smiley Happy). But if you can get a good enough framerate with a fullscreen redraw each frame it's such a more relaxed way to develop games and add features - I'd love to just get it done that way at the moment.
Given the 8520 you named with a faster CPU than the Storm and less than half the number of pixels to draw I'll just focus on OS 5 devices and newer ones.
May I ask you another question? 
If you don't mind to share any additional information - what are the most popular Java based BB devices these days (i.e. which ones have the most active and ideally app purchasing customers)?
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Game development - 2d performance question (9500 much slower than 9000)

The only market I have any real dealing with is the UK, and in that market, here are some rough percentages for downloads of a free app for last month (February):


8500 - 10%

9300 - 30%

9700 - 25%

9800 - 20%

9900 - 15%


I know this adds up to 100, it shouldn't becasue there are other devices in the list too. but this should give you a feel.