After having the story about the Nexus One multitouch flaws spread all over the blogosphere and seeing so many comments blame my test app for the problems, I figured the best way to kill that whole idea would be to just publish the source code so that people, even non-technical, can see that I do absolutely no manipulation of the touch points. All this code does is figure out what color the touch point is based on the ID and then draws those points exactly where the touch API tells it they are.
This is also a good bit of source to start with if you're interested in developing multitouch code. I still am using multitouch in the new games. This test simply allows me to understand the limitations before I design the control system. Read on for the code.
I've been using GLSurfaceView since it was introduced in Android 1.5 and I was a little let down to find that the new Live Wallpaper APIs didn't include anything like that. I like the design because it makes it very easy to quickly start working in OpenGL. Without it, there is quite a bit of tedious initialization and thread management code that isn't necessary for the vast majority of apps. Fortunately, for my first live wallpaper (Live Waterpaper), I adapted the GLSurfaceView's code and created a GLWallpaperService with a GLEngine which takes a Renderer and does the job for me.
Sooner or later in your Android game development foray you may find the need to have some code that runs faster. It turns out that Android code written in C runs 10-100 times as fast as its Java counterpart. I can verify this, as I've already moved a few major components in my newest 3D game engine into native land. That's quite a boost but let's face it - C is a pain in the ass and while Eclipse is great for Java, it's not for C, right? Wrong. Here's how to set up a super speedy NDK development environment.
Real-time Android games have a few threads to worry about. You can't block up the main UI thread because it's needed by the OS. If you block it, even for a second, your app will be deemed unresponsive and users will get the dreaded "Force Close or Wait" dialog. If your game doesn't do anything in a logic or main thread then you should be in the clear. If you do use a main thread for your game and run it as fast as it can go, as is the case with 2D games that draw to the canvas or 3D games that simply have a lot of game logic to process, you may want to think about how you're handling your input.
While doing performance testing of Light Racer 2, I had to figure out how to do the fastest common operations. One problem I found was that I was drawing a static background in a 32 bit color mode with transparency when it was much faster to draw it in 16 bit with none. Another thing I wanted to check for was to see what was faster for finding half of a number: Division by two or multiplication by point-five? This matters because I do a whole lot of that in the game to place graphics and find mid-points for various physics and AI stuff. I wasn't sure which would be faster because the ARM processor in a G1 has neither a hardware divider nor a floating point unit. I wrote this little utility to tell me how many frames per second I can get with various operations. Also - Divide by two is at least twice as fast.

I was recently asked how to have objects that animate themselves (change frames) in a stable way that isn't dependent on the FPS or lag of the device. There are many ways to do this but I have a simple one which uses the difference between the last tick and the current tick to count down. My example is in Java and is suitable for most games. The first step is to use a main loop which gives the updates that info. The best way to do this is to give every thing that is updating the exact same time information and have them all use that.

I get a lot of questions from people who are trying to decide what specific hardware to put into their computers. More often than not, they are trying to take a very old computer and make it usable again. The problem with very old computers trying to run current operating systems and applications is that it requires almost an entire new computer worth of upgrades to bring it up to speed. On the other hand, I've used several computers now that are a few years old and only need a very simple upgrade to keep them usable for another year or two. The problem is that most people simply don't know when it's worth it to upgrade and when it's time to just replace it all. Fortunately for them, we can answer most of the questions here.

If you have a Pioneer or Premier CD/MP3/Radio in your car and you don't have an auxiliary input already, it's really not too difficult to add it, provided you have a compatible head unit. Models starting with a "P" after the dash such as the Pioneer DEH-P2900 are compatible. The aux input connects through the blue IP-Bus connector on the back of the unit. Pioneer sells an adapter that comes in the form of a little metal converter box but you can get just a cable adapter for much cheaper. I've done this in 2 cars now for about $10 each total and it has worked perfectly each time.

Drupal is a very powerful Content Management System (CMS) that has a well-designed taxonomy module. Taxonomy is the system of categorization and classification of things. In Drupal's taxonomy, you can define multiple vocabularies and the terms in those vocabularies can have multiple sub-terms. This site is set up that way with the high-level terms being general concepts such as "Programming" and "Technology." The one thing I wanted that it did not do out of the box was to show sub-categories as an additional navigation menu when you clicked on a parent category. It's not to hard to implement if you know how. Read on for the code snippets.