Archive for September, 2010|Monthly archive page
As I said the other day, I started my space explorer game by trying out a bunch of different ways to animate the rocketship flying through space. (I’ve bundled all the source code and resources for the complete example — you can download it here.) I started by just creating a standard MIDlet using the javax.microedition.lcdui.game classes. Here’s what it looks like in the debugger:
In the image, I’ve set the debugger to show memory usage. In this case it’s “lcduispace” — the top process on the list. Next, I decided to try out the technique I described in my earlier post: use the same lcdui game implementation, but write each frame into an image buffer and transfer it from the MIDP Graphics implementation to RIM’s proprietary implementation to display it in a RIMlet. Here it is in the debugger: Continue reading
When I first started programming for BlackBerry, one of the things that struck me as most odd was the two completely independent graphics APIs. For MIDlets, there’s javax.microedition.lcdui.Graphics, and for RIM’s own profile, there’s net.rim.device.api.ui.Graphics. The two versions are so similar to one another that — if you’re careful — you can write a game that can use either of the two graphics APIs interchangeably, just by swapping out the include statements (and using a different set of lifecycle classes). That’s what I illustrated in Chapter 3 of my book.
But I wondered: What if I want to use the javax.microedition.lcdui.game package? But I still want to take advantage of RIM’s proprietary UI component handling? Is that even possible? Note that you can’t just place an LCDUI Sprite onto a RIM Screen or use lcdui Images interchangeably with RIM Images. Yet, there’s nothing to stop you from instantiating many of the lcdui graphics-related classes in a RIMlet — either type of application has access to the whole API.
Through experimentation, I found that it’s quite possible to take a game that was written using lcdui game Layers and run it in a RIMlet. The trick is the following: Continue reading
I’ve got some BlackBerry posts coming up, but first I’d like to say a few words about why I haven’t posted anything in six months. There are two reasons:
- I don’t like Windows OS. I’ll use it if I have to, but for my dev environment at home, I was just too tempted to clean the hard drive (once I’d finished my BlackBerry book), and replace the OS with Linux. Naturally, I told myself I’d set my BlackBerry dev environment back up on some other machine or in a virtual machine or something, and — since I love installing Windows so much — you can imagine that that task hasn’t come to the top of my “to do” list.
- I’m excited about my current job, and it’s something completely different: QA engineering for Dybuster.
Dybuster is a software suite that helps dyslexic kids learn to read. For the kids it’s a game. It works by giving the kids additional ways to learn words, using colors, tones, and 3D graphical representations:
Since I’ve been testing it, I can say that it has definitely improved my spelling in German. Of course I’m not Dyslexic. 😉
And, fortunately, there’s an English version available too (including a free downloadable demo version).