My favorites | Sign in
Project Logo
                
Code license: MIT License
Feeds:
People details
Project owners:
  mlegrand

SimTouch

SimTouch is another TUIO simulator build using the Adobe Air runtime. The core benefit to using SimTouch is the transparent background allowing the application developer to have a better grasp of what he/she is 'touching'.

SimTouch uses the same xml format that FlOSC might use to translate OSC message to a TUIO object. SimTouch needs a simple socket server to relay the XML Socket message between applications. Typically on port 3000.

My name is Matt. (mlegrand at gmail.com) Let me know if I can help and please message me with the what your working on. I'd love to see what you're building with SimTouch or on top of SimTouch. It is licensed under the MIT license because it's the most liberal license I could find. Feel free to give credit to your drunken uncle Rico or crotchety aunt Susie.

Screen Shots

Video

And here is a quick YouTube video that shows SimTouch being used in with the Physics.as example.

http://www.youtube.com/watch?v=MkRXr2Y85c0

Download

http://simtouch.googlecode.com/svn/trunk/SimTouch/src/SimTouch.air

Adobe Air run-time is required: http://www.adobe.com

Socket Server

Here is an example of a PHP socket server for relaying XML Socket messages that I've been using on a Mac:

http://www.rshields.com/?q=node/91

Additionally Richard Shields was kind enough to post a Mac and PC C++ version of his relay socket server that also works extremely well. (Used to make video on Vista)

http://www.rshields.com/?q=node/116

I also added a zip of Mac and PC versions running on port 3000: http://simtouch.googlecode.com/svn/trunk/SimTouch/socketservers.zip

Update

Local Connection added.

Local Connection

I recently added an optional local connection option to SimTouch. This allows for the use of SimTouch without the need of a socket server or socket messaging of any kind.

The catch is that the flash application has to be listening for the local connection. Here is the code that is required to be added to the standard TUIO class in many of the multi-touch applications.

import flash.net.LocalConnection;

This block of code needs to be added to the TUIO init() function:

			//---------------------------------------------------------------------------------------------------------------------------------------------
			// Add Local Connection to the TUIO init method. 

			//---------------------------------------------------------------------------------------------------------------------------------------------
			localConnection = new LocalConnection();
			localConnection.client = TUIO;
			localConnection.allowDomain('*');
			localConnection.connect("_simulatedTouch");

This block of code handles the local connection event:

	//---------------------------------------------------------------------------------------------------------------------------------------------
	// Handle simulation event.
	//---------------------------------------------------------------------------------------------------------------------------------------------
		public static var localConnection:LocalConnection; 
		
		/**
		 * Handles the local connection event to the multi-touch applicaiton. 
		 * Used in the SimTouch simulator.  
		 * Calls the processMessage 
		 * 
		 * @param		xml		XML
		 */ 
		public static function simulatedTouchEventHandler(xml:XML):void
		{
			processMessage(xml)
		}

If SimTouch doesn't cut it

If SimTouch doesn't have all the features you are looking for or you are interested in gestures I recommend QMTSim: http://code.google.com/p/qmtsim/downloads/list

Known Bugs

Double clicking to clear a touch point usually works. If you notice that you have simulated touch points sticking open the settings panel and click the clear/reset SimTouch points. Sometimes you have to click that button more that once. I'll get this fixed someday.









Hosted by Google Code