Integrating Multi-touch Input into Spring

Integrating Multi-touch Input into Spring

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
bilhamil
Posts: 16
Joined: 12 Apr 2011, 10:00

Integrating Multi-touch Input into Spring

Post by bilhamil »

Hi All,
I'm working on integrating multi-touch input into the engine. I have a thread at http://springrts.com/phpbb/viewtopic.php?f=12&t=25865that hasn't been updated in a while. Anyway, I've been talking to abma about integrating the code, the fork that I was working on is at https://github.com/bilhamil/spring. At the time I created a branch based on the 0.82 branch so that I knew I was working with something stable.

Right now I'm planning on cleaning up what I did at the time (I did a lot of hacky stuff to make working on my personal project easier). Basically what would be enabled would be passing multi-touch cursor events into lua. Currently I'm just using tuio to receive touch events, which is a cross-platform protocol based on osc for getting touch events from multi-touch sensors.

Is there interest in integrating this into the engine? If so, what would be the best approach going forward? What concerns do the devs have? Should I make a feature branch based on the current development branch? I appreciate the help.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Integrating Multi-touch Input into Spring

Post by CarRepairer »

I noticed in your youtube video you used the "pinch" motion to "tilt" the camera (changing the pitch of the map). I would recommend that when you integrate with spring that you follow the model used by the android maps app:

Pinch to zoom.
Two-finger-drag to tilt.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Integrating Multi-touch Input into Spring

Post by smoth »

wow, you are still working on that stuff? very cool man!
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Integrating Multi-touch Input into Spring

Post by Das Bruce »

Holy shit this is a real thing? Nice.
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Integrating Multi-touch Input into Spring

Post by MidKnight »

Your stuff is awesome!
Of course we want multi-touch! :-)

...no idea where we could get ahold of multitouch HIDs, though.
User avatar
HeavyLancer
Posts: 421
Joined: 19 May 2007, 09:28

Re: Integrating Multi-touch Input into Spring

Post by HeavyLancer »

MidKnight wrote:...no idea where we could get ahold of multitouch HIDs, though.
Make one yourself?
bilhamil
Posts: 16
Joined: 12 Apr 2011, 10:00

Re: Integrating Multi-touch Input into Spring

Post by bilhamil »

One of my colleagues actually develops sensors that you can just put on top of regular displays http://ecologylab.net/research/zerotouch/index.html. They're pretty affordable, although he hasn't really ramped up production yet. Hopefully, that will happen soon.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Integrating Multi-touch Input into Spring

Post by Beherith »

Wow, that demo video features spring! Really nice stuff!
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: Integrating Multi-touch Input into Spring

Post by varikonniemi »

A multitouch desktop display is actually my next upgrade, spring with a proper tuned touch-ui would be something special.

:shock:

me gusta.
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Integrating Multi-touch Input into Spring

Post by MidKnight »

SirArtturi wrote:Found this from suggestions:
http://www.youtube.com/watch?v=wyZrrkwM ... re=related
Use forum search. :-)

EDIT: Actually, I can't find the the thread with that video either using forum search. :s
User avatar
SirArtturi
Posts: 1164
Joined: 23 Jan 2008, 18:29

Re: Integrating Multi-touch Input into Spring

Post by SirArtturi »

Ah yes, a bit hasty post. Didn't bother to visit every urls in this thread.

So yeah, doubled, better...
varikonniemi
Posts: 451
Joined: 03 Jul 2011, 11:54

Re: Integrating Multi-touch Input into Spring

Post by varikonniemi »

Awesome!

I think what we need is a stable multitouch API, so the other devs can make their adjustments as they please. And this should be integrated into the engine as soon as possible.

Can you imagine spring being one of the first RTSs to support multitouch out-of-the-box and it being 100% configurable just via LUA? That sounds sweet to my ears, and by the looks of it, it is not far away.

Keep up the good work! I REALLY appreciate it, touchscreen displays is the way of the future, we only need to figure out the best way to interact with them!
bilhamil
Posts: 16
Joined: 12 Apr 2011, 10:00

Re: Integrating Multi-touch Input into Spring

Post by bilhamil »

Voidness and I have been working on a lua sockets widget that acts as a TUIO listener for touch events. Basically it opens up a udp socket, parses incoming osc messages, interprets the tuio and generates widget events for touches.

I've attached the listener itself along with some of the widgets we have been using for doing touch interaction if anyone wants to try it out. A lot of it is built off of modified versions of widgets in Zero-K, so I'm not sure how readily the widgets may be added to other games.

Hoping to work on doing Windows 8 touch event integration later this summer (there are a lot of problems with win 7 touch), but this should work with a lot of touch sensors that use win 7 touch using a bridging application like: http://dm.tzi.de/touch2tuio/
Attachments
Lua_TUIO_Touch.zip
tuio touch listener widget and associated interaction widgets
(2.38 MiB) Downloaded 55 times
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Integrating Multi-touch Input into Spring

Post by Licho »

Very nice, we could integrate this to ZK itself and the sender to Zero-K lobby if its some sort of open source/CC common license
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Integrating Multi-touch Input into Spring

Post by abma »

awww,.... awesome! :D

what to do with the touchdev branch then? :-/
bilhamil
Posts: 16
Joined: 12 Apr 2011, 10:00

Re: Integrating Multi-touch Input into Spring

Post by bilhamil »

Like I said earlier I think there would be value in having a windows touch solution at some point, which would have to be done in the engine. That would probably use a significant portion of the code already in touchdev.

btw luasockets was a really great addition to spring imo :)
123vtemp
Posts: 215
Joined: 20 Mar 2008, 11:02

Re: Integrating Multi-touch Input into Spring

Post by 123vtemp »

Really awesome. With this new form of user input the interface and way the game is played will diffidently look and work completely different totally different. I see this being most useful in large scale attacks. With the amount of input we can have since we are not limited to just one cursor. we can divide and reorganize, and redirect many more units at a time. For Example, now having a fleet of 20 bombers coming across the screen, with only seconds to divide them between targets might be extremely effective.

The most successful part of implementing extremely effective group management will probably be a transition in scale of focus.

Really really cool potential!

Springs game play potential was unmatched as it is but now it could give even more scale and control to a user. WOW.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Integrating Multi-touch Input into Spring

Post by abma »

@bilhamil:

any efforts to integrate the lua-thing into zero-k? i've enabled luasocket as default and listening to a socket is also allowed as default.

see https://github.com/spring/spring/commit ... 3d024e118b

is that enough to make it work out of the box?
Post Reply

Return to “Engine”