Something a little more substantial than a snippet for this latest instalment... an entire mobile Java game! Opposite Lock's source code is now available on Google Code under a GPL license. Check the sources out of SVN (the 'jsr' trunk is the only active one for now) and it should build as-is with Eclipse and EclipseME. Go on! What are you waiting for?!
Okay, where's the catch? Well, whilst the Java source is exactly the same as the published version, I've only included three of the 10 tracks (as per the free demo version). That's the only difference. When the game sales finally peter out I'll release the art assets under a Creative Commons license and commit the missing tracks to the repository.
So, now you have the source how do you create your own tracks? For that you'll need the editor and build tools, available from the project's download page. I'll be cleaning up and adding the source for these to the repository in good time.
I wrote this between 2004/5, originally released as Jet Set Racing (which will explain why the letters 'jsr' appear everywhere). Opposite Lock is a reworking of this earlier game engine with new graphics (and new code to handle the expanded tracks). The tools are all pure Java and run happily on Windows and Mac OS.