Seth made this game for Ludumdare 19. It's a complete 2d game, source is in svn.
Setup to compile for Windows, OSX, iPad, and iPhone
Illustrates how to use the DPadComponent for touch screen directional control
Illustrates how to manage input from multiple sources using virtual keys
Illustrated how to the following gamepads: iCade, xperia, DirectX (360 controller, etc), and 60beat
Graphics are horrible. Anyone want to redo them?? If so, I'll release it as a freebie on iOS and put your name on the main menu.
It has an issue where you can't move if FPS goes under 30 or so.. just a dumb way I did the player movement, should fix it
You can download ready to run versions here.