project-navigation
Personal tools

Author Topic: Multitouch table support  (Read 5646 times)

Offline zork

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Multitouch table support
« on: June 27, 2012, 10:58:26 pm »
I have to implement a proof of concept for multitouch table input. Because i like the xcom series, i want to do it for this game. it is only a proof of concept, so i have to do it quick and dirty. is there a easy way to simulate mouse input ? ( i planed to use a socket client, which read events from the multitouch server and store the actions in shared memory for the game gui)

thanks in advance

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Multitouch table support
« Reply #1 on: June 27, 2012, 11:19:03 pm »
maybe you can check the android code, and hack the SDL port with your own events. Pelya do some things like that for some input. You can find some information on the topic http://ufoai.org/forum/index.php/topic,5708.0.html

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Multitouch table support
« Reply #2 on: June 27, 2012, 11:25:34 pm »
maybe you also can check to port the game to sdl 1.3/2.0, which is not yet released. This kind of patch can be anyway usefull.

Offline zork

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Re: Multitouch table support
« Reply #3 on: June 27, 2012, 11:33:38 pm »
I have compiled it already for ubuntu. but so far, i didnt look deeper into the source code. i only want to change the cursor position or raise a menu via a gesture...

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Multitouch table support
« Reply #4 on: June 27, 2012, 11:59:57 pm »
Which kind of device or api do you use?
There is some interesting thing to do to use pinch/spread gesture to zoom in/out geoscape and battlescape. I think it is one of the more easy thing to do. For other things it is hard to know without knowing exactly what you want to do.



Offline zork

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Re: Multitouch table support
« Reply #5 on: June 28, 2012, 02:25:35 pm »
I try to describe the components: The multitouch table has a udp server based on TUIO protokoll. This server is a independend device which sends tracker actions to all conected clients. on my notebook is a client which uses the $1 algorithm to recognize gestures. i implemented a posix shared memory which stores touch events in a ringbuffer. so i have to modifiy the ufo_ai input routines to read events from the shared memory ringbuffer. i hope there is a easy way to do this.

Offline zork

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Re: Multitouch table support
« Reply #6 on: June 28, 2012, 09:43:56 pm »
Can someone tell me how to raise a window in geoscape ( which .c file ) ?

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: Multitouch table support
« Reply #7 on: July 03, 2012, 02:55:03 pm »
UFOAI use 2 ways for events.

We use event from SDL, then you can check the code to see how to feed the game. i dont dont have a lot of time, cl_input.cpp or something like that.

The second way is to use commands. cl_input should contain both.

Our windows manager only use some event (mouse click and move...), then you can't send new events to widgets (geoscape) without hack. But there is some way (shortcut) to call existing widgets (zoom in, zoom out...)

You can check the code ui_node_geoscape.cpp to see default events, you can check cl_map.cpp to see other things about geoscape (maybe there is some registration of command).

I know TUIO, and I understand what you want to do, but i unfortunatly dont have a lot of time right now to spend on the game. But feel free to ask question or post some code, i hope i can (or somebody else) help a little.