2 point multitouch

Previous topic - Next topic

MrPlow

I have a new acer z3 and it only has 2 point multitouch but its enough for my game but the get mouse routine isn't working as expected.

How should I code it for 2 point touch?

Thks
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#1
Some Android Devices have pretty much very bad multi touch support or not working as you should. You have property faced this bug (not extractly your model, but you have the idea):
http://www.youtube.com/watch?v=FNcD7AYjrws

If that happens on your phone, there is nothing Gernot can do at all, due that is just bad implemented on the hardware its self. That why some multi touch based apps on android see buttons on top left and button right, or something like that to avoid like that.

here is what im does for checking:

Code (glbasic) Select

FOR i=0 TO GETMOUSECOUNT()-1
SETACTIVEMOUSE i
MOUSESTATE mx, my, mba, mbb
// some input retine here.
NEXT

[/code]
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

#2
Thanks SF,

I do that also - but i just found out its a bug on the Z3 on portrait mode for the x-axis...
I am installing an update and hoping that'll fix it...(*nope* didnt fix - not sure if considered as a bug or just a limitation now)

I usually do a boxcoll with the mouse coords like so...find it neater than all the "if greater than" etc..

Code (glbasic) Select

//within getmousecount loop
IF BOXCOLL(10,shipy+60,70,60,mxx,myy,5,5) AND mb1=1
      shipdir# =  -(2.0*speed*extraspeed)

ELSEIF BOXCOLL(90,shipy+60,70,60,mxx,myy,5,5) AND mb1=1
  shipdir# =  2.0*speed*extraspeed

ENDIF


I dont want to have to use more screen area for my controls...want to have them all on the bottom...
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#3
Im have not see your game in action, so im are not sure you planning do 4 or 8 way game?

You should been aware this kind of Multi Touch issues, which you cant avoid, if you placed all buttons in the bottom. A easy fix is simply let user move the controller in a config. My games do also placed all buttons in buttons too, but is not true multi touch game anyway and then its would not intefere.

Im are not sure what you mean with portrait mode? IF you set orientation by your self, im remeber (but im do not sure here throught) you need to orientation your cords by your self. Which that in mind, try Draw a circle where finger is touched and let Draw the coll boxes to the screen, so you easer can debug, what its really happens.

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Thanks Spacefractal,

I'm glad I found out about it before going live...I have amended my controls to accept this.

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs