Some time ago I had some free time and I started up World of Warcraft to overcome my boredom. Well seems like World of Warcraft is a terrific source of boredom too.
After some time lying on my couch I asked myself if I could control the WoW running on my Mac from the couch - without any screen sharing/vnc stuff. Just turning my iPhone into a wireless video game controller. My main question was if the latency in a 54g wifi network would be low enough to allow fluent play.
So I started up XCode and hacked a fast proof of concept. After some hours I got 2 apps. A server app for the Mac that will send key events to the WoW client if told so. And an iPhone app that will connect over local wifi to the server app and tell it what to do.
For sending the key events I used the Obj-C AppleScript wrapper and for networking I implemented a simple tcp plain text protocol. The server announces its service over Bonjour so there is no need for ip/port configuration.
The outcome of this experiment was that wifi latency is for controlling WoW no problem at all. I'm sure you could make a really fine application from the prototype - you just had to implement proper networking (I'm abusing NSFilehandle instead of BSD sockets), proper key event forwarding (AppleScript is really really slow) and you would have to deal with Activision Blizzard's legal department.
And as I am in no mood to do a big amount of work and then have it trashed by some lawyers I chose to open source my prototype. You can get the code from github and it is licensed under the BSD license (with attribution). So have fun
View the project page for the source code and more information.
Interesting use of the iPhone. I just heard that logitech released a Free iPhone Based Controller:
http://www.downloadsquad.com/2010/02/06/touch-mouse-from-logitech-turns-your-iphone-or-ipod-touch-into-a-keyboard/
Sounds like you’ve come up with the same thing!
Anthony.