Multi Touch Maptool - TUIO support

Progress reports and musings from the developers on the current gaming tools.

Moderators: dorpond, trevor, Azhrei

Post Reply
eRaz0r
Cave Troll
Posts: 41
Joined: Sun Mar 28, 2010 12:29 am

Multi Touch Maptool - TUIO support

Post by eRaz0r »

I once threatened to work on a multi-touch version of Maptool.

Well, I finally made good on that threat - at least, the "working on" part - it's far from complete.

My initial thought was to use MT4J - multi-touch for java. MT4J is a great framework, but it is built on Processing, which, while it might lend itself well to rendering OpenGL stuff, it uses it's own PApplet base class.. which I thought was going to be too tricky to integrate properly with Maptools (it's effectively incompatible with AWT/Swing).

So I dialed it back. Instead of embarking on this grandiose UI I envisaged, I decided to just work on TUIO support within Maptool itself.

My plan was to impact the Maptool source as little as possible, and in fact, I did one better - the project doesn't touch the source at all !

I use a Decorator pattern and invoke Maptool.main() from another class, then set the MapTool.getFrame().getToolbox().setSelectedTool(myTool) to a new custom Tool I call TuioPointerTool. This tool receives TUIO protocol events and detects gestures in the form of two-finger drag (I use it for background drag), or a single-finger drag on a token for repositioning. Of course, the trick is that it should support multiple simultaneous inputs.

I have plans for it to expand into fiducial recognition, so I can put miniatures on the surface and have them control tokens -perhaps even to fire off macros.

The source isn't yet available because it's in a lot of flux, I just thought I'd share.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Multi Touch Maptool - TUIO support

Post by Phergus »

Very cool. Looking forward to seeing how it goes.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Multi Touch Maptool - TUIO support

Post by Azhrei »

Yeah, this is cool!

When you get to something stable we can talk about integrating it. Perhaps a Preferences setting that add your TUIO tool into the event queue ahead of the other tools or something...

We're revamping the overall code structure for 1.4 and while multitouch is not specifically on our list, we are aware that there is a lot of call for "alternative" input devices (Wii motes, multitouch, etc).

eRaz0r
Cave Troll
Posts: 41
Joined: Sun Mar 28, 2010 12:29 am

Re: Multi Touch Maptool - TUIO support

Post by eRaz0r »

I think at this stage it's really going to be only good for "player" maps - a full integration would require the other tools (pointer, drawing etc) become TUIO aware. For many people I would imagine that just moving the tokens and dragging the map around would be enough to start with..although some way to activate macros would have to come quickly after that.

My first cut was very promising - the TUIO tool could drag the map around with a 2 finger drag. Now I have to manage multiple simultaneous gestures, which is a little harder, as each added touch could participate in different gestures..

I'll keep you posted.

asciutto
Kobold
Posts: 1
Joined: Tue Jun 28, 2011 1:44 pm

Re: Multi Touch Maptool - TUIO support

Post by asciutto »

I hate to bring up an old thread, but I'm currently building my own DI table for D&D and was wondering how the progress on TUIO integration was coming along! The feature I'm most excited about is fiducial, and really only for movement of PC tokens.

The multi-touch within the program would be an awesome bonus to, but fiducial is really all that's needed.

Thanks for taking your time to do this!
Anthony

abetterway
Kobold
Posts: 1
Joined: Tue Jun 28, 2011 2:15 pm

Re: Multi Touch Maptool - TUIO support

Post by abetterway »

eRaz0r wrote: My first cut was very promising - the TUIO tool could drag the map around with a 2 finger drag. Now I have to manage multiple simultaneous gestures, which is a little harder, as each added touch could participate in different gestures..

I'll keep you posted.
Have you made much progress? I am looking forward to seeing your work. I really want to run MapTools on my DSI Table.

Kyle

jp12x
Kobold
Posts: 1
Joined: Mon Aug 15, 2011 1:21 pm

Re: Multi Touch Maptool - TUIO support

Post by jp12x »

I have built my own table from scratch. Tuio support is my next goal. I assumed Java could talk to Java... But, I am a total n00b,so I'm going to have to start some Java for dummies. If anyone has code they're working on, I'd love to try to add to what you're doing. I'm also planning on making macros for fiduciary markers.

My thought was you could use markers for facing tokens and adding or removing markers would shift the corresponding tokens to the hidden layer. So, you'd have to set up a token for each fiduciary marker in advance. But, once done, you could adjust the token as necessary. If the marker is a base on the figure and can be swapped to other figures, you could just swap figures and edit the token on the fly.

Again, if anyone would send me some code to get started, I'd love to avoid having to do a full java course.

Thanks

eRaz0r
Cave Troll
Posts: 41
Joined: Sun Mar 28, 2010 12:29 am

Re: Multi Touch Maptool - TUIO support

Post by eRaz0r »

I hate to say it - I got sidetracked.

I was faced with a full rewrite to account for various threading issues, and then other more pressing matters intruded into my life.

I do hope to return to this one day. The code was not particularly advanced and anyone interested in multi-touch tuio code for Java should look into the source for MT4J. While all the graphics processing code is incompatible with Swing, the TUIO gesture recognition stuff is worth a look. The big difference is that MT4J can target events on individual objects, whereas any MapTool compatible pointer has to discern gestures that are being received across the whole map, and then drill down to see if that gesture is aimed at a token or the map itself.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Multi Touch Maptool - TUIO support

Post by Azhrei »

I've never looked at a multitouch API, but I'm guessing that the other devs here might be interested in chatting without at some point about your experiences in grafting mt code into MapTool (or any other app for that matter). Would you be willing to chat or answer a here or there? Thanks.

oslowski
Kobold
Posts: 3
Joined: Mon Nov 28, 2011 6:05 am

Re: Multi Touch Maptool - TUIO support

Post by oslowski »

eRaz0r wrote:I hate to say it - I got sidetracked.

I was faced with a full rewrite to account for various threading issues, and then other more pressing matters intruded into my life.

I do hope to return to this one day.
Do have any estimate as to when "one day" may be? ;) I was really excited to see that someone picked up this obvious step in further developing Maptool into the multi touch realm. As this technology seems to be emerging more and more, the RPG group I am playing with and I decided to build a MT table ourselves, but the big question is which software to run. Maptool would be best, if it would actually respond to a multi touch interface.

So, BIG question: do you think you will continue your efforts in the quest to bring multi touch capabilties to Maptool? This would be simply awesome to say the least!

Thanks!

flyndad
Cave Troll
Posts: 48
Joined: Wed Mar 07, 2012 4:24 pm

Re: Multi Touch Maptool - TUIO support

Post by flyndad »

Ok,.. I really hate to step in where my ignorance will become so immediately apparent, but at the great risk of doing so I would like to propose an idea. If I am way off course please don't hesitate to berate, ridicule and toss me out of this thread with my tail between my legs.

Regarding Multitouch and most specifically the movement of figures, it occurred to me after having watched the youtube version of the projector table video that MPTools has posted on the site where the builder utilized a IR "pen" to "move" his token after having picked up his figure, that it would be "really neat" if a player could do the same and NOT have to use a pen or "lift" his figure off the playing surface.

Solution: ( currently patent pending, 4D RPG, Inc. ) A base that lights an infrared LED when it is touched and turns it off when let go, just like those neat little night stand lamps... so off we went to the design table and came up with a metal base that utilizes a capacitive momentary switch to open and close a circuit powered by a coin battery. When you touch the base you have LED, when you let go, you don't.

I realize that this doesn't address the myriad of possibilities that exist with thouchscreen tech., but I do believe it addresses the movement of figures on the playing surface quite well.

Now,... to get those little guys to face a certain direction,.. well,.. we have that pending too. Not certain it will work yet, of course, BUT multiple LEDs can be read, and the pattern of LED can be associated with not only a certain base but the system can also read the direction the base is facing. and I would think that the "programming" for this wouldn't be too extreme. OR,... If using a lcd display laid flat without IR, simply create a base with mini legs, or "points" that touch the surface. That grouping pattern could be programmed to recognize that base, and off ya go! ,, "Activation" (the mouse click) could simply be programmed to read something like, "this pattern is currently on the surface, it went away for a predetermined amount of time (the player just picks it up a few mm and puts it right back down) and came right back in almost the same spot,.. ohh, that is a "click",..

We hope to introduce the former product to the MPtools community soon,...

OR I could have no idea what I am talking about and deserve a good toss out of the proverbial western bar glass window,....

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Multi Touch Maptool - TUIO support

Post by jfrazierjr »

flyndad wrote:Ok,.. I really hate to step in where my ignorance will become so immediately apparent, but at the great risk of doing so I would like to propose an idea. If I am way off course please don't hesitate to berate, ridicule and toss me out of this thread with my tail between my legs.

Regarding Multitouch and most specifically the movement of figures, it occurred to me after having watched the youtube version of the projector table video that MPTools has posted on the site where the builder utilized a IR "pen" to "move" his token after having picked up his figure, that it would be "really neat" if a player could do the same and NOT have to use a pen or "lift" his figure off the playing surface.

Solution: ( currently patent pending, 4D RPG, Inc. ) A base that lights an infrared LED when it is touched and turns it off when let go, just like those neat little night stand lamps... so off we went to the design table and came up with a metal base that utilizes a capacitive momentary switch to open and close a circuit powered by a coin battery. When you touch the base you have LED, when you let go, you don't.

I realize that this doesn't address the myriad of possibilities that exist with thouchscreen tech., but I do believe it addresses the movement of figures on the playing surface quite well.

Now,... to get those little guys to face a certain direction,.. well,.. we have that pending too. Not certain it will work yet, of course, BUT multiple LEDs can be read, and the pattern of LED can be associated with not only a certain base but the system can also read the direction the base is facing. and I would think that the "programming" for this wouldn't be too extreme.
You would be wrong on that last statement. The guts of MT need a complete overhaul to naively support multi-touch, mainly because Java itself does not support it(at least not in version 6). I too had thought of using multiple LED's in a pattern to determine facing when someone else brought this up on another forum.

Unfortunately, any support for multi-touch will not come in the 1.3 release unless someone external codes it and releases it outside their own group(ie, It won't be in an official MapTool release of 1.3). MapTool has been in a feature freeze for well over a year, and work on 1.4 won't start until 1.3 is "final". We are not quite sure when that will be, but hopefully in the near future. Even at that, a testable 1.4 that might be partially usable(ie, might not have all of 1.3's features) would be 6-12 months after work begins IMHO.

At this point, unless you know a programmer who is willing to modify the code(which is not an easy effort!) or unless someone else does that work, you won't see a multi-touch enabled MapTool in less than a year.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Post Reply

Return to “Developer Notes”