2 of 2
2
SimTouch - Another TUIO simulator
Posted: 16 November 2008 01:27 AM   [ Ignore ]   [ # 16 ]
RankRank
Joined  2008-05-20
Total Posts:  219
Member

ok got it to work… it was the global security settings.... smile

Profile
 
 
Posted: 24 November 2008 01:08 AM   [ Ignore ]   [ # 17 ]
Avatar
Rank
Joined  2007-12-08
Total Posts:  87
New Member

Do you find that downloading and running that simple socket server annoying?  Have you ever wished that you could just fire up the simulator and test your application. 

Well now you can . . . 

[end late night infomercial voice]

I added an optional local connection variable to the SimTouch application.  This allows for the use of SimTouch without the need of a socket server or socket messaging of any kind.  Just fire up application, resize and start testing.  There is one drawback, your application has to be listening for the local connection. 

Here is the code to add to the TUIO class:

(the TUIO class is located at flash.events.TUIO)

import the local connection class:

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:
(you can add it anywhere but I added this right after the init() function or around line 116)

//---------------------------------------------------------------------------------------------------------------------------------------------
    // 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)
        
}

There is also a checkbox to avoid getting that annoying warning box saying your not connected to port 3000.

Here is a bad screen shot of the settings panel with the new local checkbox:
Picture%203.png

Hope this helps,
MattL

Profile
 
 
Posted: 29 November 2008 01:54 PM   [ Ignore ]   [ # 18 ]
Avatar
Rank
Joined  2007-12-08
Total Posts:  87
New Member

Richard Shields posted a new version of SocketServer over at:

http://www.rshieldslab.com/networking/socketserver-gets-a-gui/

It is currently for OSX 10.5 only.  The new socket server has a really nice GUI interface and allows for the auto-detection of serial devices.  Much easier to use than firing up Terminal in my opinion.

Profile
 
 
Posted: 24 March 2009 02:58 PM   [ Ignore ]   [ # 19 ]
Rank
Joined  2009-03-22
Total Posts:  5
New Member

Nice simulator smile

There’s a quite annoying bug in simtouch.

When your application’s resolution is smaller then windows’ screen resolution and application is not in fullscreen mode - it reports wrong blobs coords

Profile
 
 
Posted: 25 March 2009 04:23 AM   [ Ignore ]   [ # 20 ]
Avatar
RankRank
Joined  2007-04-03
Total Posts:  241
Moderator
Yalantis - 24 March 2009 02:58 PM

Nice simulator smile

There’s a quite annoying bug in simtouch.

When your application’s resolution is smaller then windows’ screen resolution and application is not in fullscreen mode - it reports wrong blobs coords

Are you sure? I haven’t noticed any bug with simtouch lately… You did resized the overlay right?

 Signature 

My multitouch blog: http://www.multigesture.net
Howto: Compile touchlib on windows XP/Vista
Howto: Compile touchlib on Ubuntu Linux
Downloads: Touchlib SVN builds

Profile
 
 
Posted: 25 March 2009 11:07 AM   [ Ignore ]   [ # 21 ]
Avatar
Rank
Joined  2007-12-08
Total Posts:  87
New Member

@Yalantis,

Thanks for checking out the simulator.  The documentation isn’t great for this little application but if you drag the application into position and resize it to whatever shape your multi-touch application is, it should translate the x and y position correctly.  If I remember correctly, I think it does location as a percentage of width and height. 

Here is a screen shot of the limited UI:

20090325-xe4rxmfx72y9bg8jrhekamhts.jpg

Here is a quick link to the google code repository:
http://code.google.com/p/simtouch/

And you can report bugs here:
http://code.google.com/p/simtouch/issues/list

Thanks again and I can’t wait to see what you guys are building!

Sincerely,
Matt

Profile
 
 
Posted: 25 March 2009 03:07 PM   [ Ignore ]   [ # 22 ]
Rank
Joined  2009-03-22
Total Posts:  5
New Member
Falcon4ever - 25 March 2009 04:23 AM

Yalantis - 24 March 2009 02:58 PM
Nice simulator smile

There’s a quite annoying bug in simtouch.

When your application’s resolution is smaller then windows’ screen resolution and application is not in fullscreen mode - it reports wrong blobs coords

Are you sure? I haven’t noticed any bug with simtouch lately… You did resized the overlay right?

Very sure. Yeah, I did resize the overlay.

Blobs reports correctly at the top of the overlay, but as closer you click to the bottom - you will see increase in blobs misplacement by Y axis.

Cant give you screenshot because it doesn’t show cursor on the screen :/

Profile
 
 
Posted: 25 March 2009 03:17 PM   [ Ignore ]   [ # 23 ]
Rank
Joined  2009-03-22
Total Posts:  5
New Member

Hm, cant reproduce it. But did nothing -)

Profile
 
 
Posted: 30 March 2009 11:36 AM   [ Ignore ]   [ # 24 ]
Avatar
Rank
Joined  2007-12-08
Total Posts:  87
New Member

@Yalantis,

I would wager a guess that the overlay is just a little off, maybe it’s placed around the application window and not the actual flash content (or something like that).  Because the X and Y coordinates are calculated by a percentage of the overall area, any small mistake would get exponentially larger as you moved away from the top (y=0). 

Thanks for checking it out, and let me know if you see any other oddities!
Matt

Profile
 
 
Posted: 30 March 2009 01:35 PM   [ Ignore ]   [ # 25 ]
Rank
Joined  2009-03-22
Total Posts:  5
New Member

sure, thanks for help anyway -)

Profile
 
 
Posted: 08 May 2009 05:45 AM   [ Ignore ]   [ # 26 ]
Avatar
Rank
Joined  2008-08-20
Total Posts:  36
New Member

first: thanks for this great touch simulator MattL.

i use it for a lecture where students develop simple multitouch applications in flash/as3. i made a litte “HowTo” for them since they aren’t real computer scientists but media and interface designers. the howto is very simplistic and you guys won’t need it, but i thought maybe there will be some similar use for this document as an “how to start and use SimTouch” explanation for not-so-geeky users. wink

here is the file:
http://www.froemmer.net/mt/SimTouch_HowTo.pdf

Profile
 
 
Posted: 21 May 2009 01:39 PM   [ Ignore ]   [ # 27 ]
Rank
Joined  2009-05-15
Total Posts:  3
New Member

this is an interesting discussion.. thank you for sharing smile
simulation rachat de credit

Profile
 
 
Posted: 29 June 2009 02:39 PM   [ Ignore ]   [ # 28 ]
Avatar
RankRankRank
Joined  2007-03-13
Total Posts:  365
Sr. Member

i love SimTouch! i use it for all my flash based development these days. I just needed to add my 2 cents! Thanks for this great app!

 Signature 

the all new Multitouch South Africa http://www.multitouchsa.co.za
those that say it can’t be done shouldn’t interrupt those doing it

Profile
 
 
Posted: 29 June 2009 06:01 PM   [ Ignore ]   [ # 29 ]
Avatar
Rank
Joined  2007-12-08
Total Posts:  87
New Member

@donovan,

Thanks so much!  Can’t wait to see what cool things you guys are building with it.

Profile
 
 
   
2 of 2
2