# Augment an existing game with touch gestures

I want to enhance Homeworld 2 gameplay with touch gestures. The game is running on Windows.

So, two questions:

1. Is it possible to wrap the game with a program that would capture touch gestures, convert it to keyboard and mouse input and send it to the game?
2. How would I approach this task? Using 3rd party libraries, making my own, or something built in to Windows?
• Why not ask the developers of Homeworld Touch? I think this question isn't a good fit for the site, since it's a which technology to use question and this isn't the place for recruiting. Check out the FAQ, there's some sites listed there that would be a better fit for such questions.
– House
Mar 14 '13 at 17:03
• Because we are not working on the same game nor even the same platform? They are doing Homeworld 1 (source code released) and I am doing the sequel (no source code available). Also they are doing iOS and I am doing Windows Mar 14 '13 at 17:23
• OK pilau. I was mostly linking it because I thought you might be interested. See the remainder of my comment above.
– House
Mar 14 '13 at 17:26
• I've edited the question to be more general and removed the "which technology to use" direct question and the request for people to join the project. If you feel like this edit is too drastic, please revert it. However, I think it'll make it more answerable.
– House
Mar 14 '13 at 18:28

What should happen is you should be able to attach your app as a kind of "virtual keyboard" into the Homeworld 2 game window, and the commands you send via SendMessage need to be picked up by the game, as if the player were pressing those keys on the keyboard.
• It seems kind of unbelieveable, eh? But the functionality is there. I was thinking about a global hook, where you just monitor the entire system for events, then use SendMessage to "manufacture" the correct inputs for Homeworld, based on the information you learned in your HookProc. The hooker has to unhook itself! The hookee may be unaware it is being hooked. Mar 14 '13 at 22:50
• Lol that wordplay is just hilarious. Yes, and to build on our pun-demic, it's as if SetWindowsHookEx reads "exploit me". Okay, I'm over the top now. Thanks for your help! Now just need to find a good gesture library in .net ;) Mar 15 '13 at 2:33