Quick question about iPhone's multi-touch

Non-platform specific questions.

Quick question about iPhone's multi-touch

Postby Game A Gogo » Mon Nov 15, 2010 11:53 pm

Is it possible to get the finger's position (with xmouse and ymouse) when he drags it on the screen?
Something like you aim with one finger and you use another to shoot (Of course shooting would probably make the cursor jump, but I can work around that)

Not sure if this has been covered yet, I checked in the forums, but it was only about multiple clicks detection.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby skydereign » Tue Nov 16, 2010 12:08 am

Well since I don't have an iPhone to test, I haven't been able to fully explore multitouch, but only one click is received by an actor. That actor can see those xmouse/ymouse values, but I believe no other actor can (this might not be the case but I don't see how it could be done cleanly if there are two clicks being watched). If you want to see another actor's xmouse/ymouse you could always set two actor variables. Sorry I can't be more specific, but xmouse and ymouse do work to some extent. I used them for the classic dual joystick controls in a lot of iPhone games.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby zxcvbnm » Tue Nov 16, 2010 12:42 am

You can touch 3 or 4 points on the screen at once. I tested this on ipod .
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby Game A Gogo » Tue Nov 16, 2010 10:38 am

zxcvbnm wrote:You can touch 3 or 4 points on the screen at once. I tested this on ipod .

I knew this already

Skydereign: I'll have to hope what I'll attempt works then, I don't have an iPhone either. I wanna try making a space shooter for it, I want the player to move depending on where the finger on the screen is, unless he clicks on the buttons to change weapon/shoot. Thanks though!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby skydereign » Wed Nov 17, 2010 8:08 am

That's pretty easy to do, and translates well to iPhone. As long as the button sets some variable used by the actual move/aim/shoot mechanic, its just like single touch.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby Kodo » Sun Jan 02, 2011 2:38 am

I've been searching the forums for a while tonight and haven't found what I'm looking for yet :( I have a platform game that includes a joystick and a jump button, they work fine on their own, but when you're using the joystick to move pressing the jump button interferes with the joystick, as though you are no longer using it, then as soon as you release the jump button the joystick starts working again.

The joystick checks the x & y position of the mouse when the finger is moved around on the sprite (Mouse Enter/Leave events), i think that when I press the jump button (Mouse Down Event) on the other side of the screen those mouse x & y cords suddenly register as being outside of the joystick area and cause the joystick to glitch. Has anyone come up with a good way to handle this kind of multi-touch control yet? - I've even tried detecting mouse movement for the joystick on the sprites draw event, which works but results in the same problem :(
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby Kodo » Sun Jan 02, 2011 1:19 pm

I've abandoned the idea of using a 'joystick' on which you hold down your thumb and move around (much like a D-Pad) and have instead gone with simple buttons for left, right and jump. Though it's not what I originally wanted it is working just fine :)
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby Chai » Thu Feb 03, 2011 1:03 pm

Kodo wrote:I've been searching the forums for a while tonight and haven't found what I'm looking for yet :( I have a platform game that includes a joystick and a jump button, they work fine on their own, but when you're using the joystick to move pressing the jump button interferes with the joystick, as though you are no longer using it, then as soon as you release the jump button the joystick starts working again.

The joystick checks the x & y position of the mouse when the finger is moved around on the sprite (Mouse Enter/Leave events), i think that when I press the jump button (Mouse Down Event) on the other side of the screen those mouse x & y cords suddenly register as being outside of the joystick area and cause the joystick to glitch. Has anyone come up with a good way to handle this kind of multi-touch control yet? - I've even tried detecting mouse movement for the joystick on the sprites draw event, which works but results in the same problem :(


I'm facing the same problem too.
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby again » Thu Feb 03, 2011 4:26 pm

Thats wierd Iam trying to understand what you guys are asking but i can't. If you have an actor and lets say you have a forward button and jump button when you press them at same time they both work. Can you and chai please explain question better so I can understand.
Free windows mobile games like doodle jump and super mario bros
http://krenisis.freeforums.org/
again
 
Posts: 258
Joined: Wed Jan 19, 2011 7:06 pm
Score: 33 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby savvy » Thu Feb 03, 2011 4:44 pm

on the joysticks, use distance and direction functions to get it right, as in my prinny pals 2 game, where the joystick moves the blocks. however the speed only has 1 minor adjustment on the actual joystick, the rest of the speed is up to the speed-ometer on the right hand side.
http://game-editor.com/forum/viewtopic.php?f=4&t=9962

here is the tutorial for the joystick.
http://game-editor.com/forum/viewtopic.php?f=4&t=9989
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby Kodo » Thu Feb 03, 2011 9:17 pm

Hi Savvy, thanks for the post, but getting a joystick to work is no problem, the problem is when you are controlling something with the joystick and then at the same time press somewhere else on the screen to activate another button. Your tutorial while good suffers the same problem when tested on iPhone. IE. when you are controlling your car with the joystick, then press another button (I added one on the other side of the screen) the joystick registers that you have pressed the far side of the screen and the car zooms to the right, even if you are holding the joystick left :(
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby Chai » Fri Feb 04, 2011 1:53 am

Kodo wrote:Hi Savvy, thanks for the post, but getting a joystick to work is no problem, the problem is when you are controlling something with the joystick and then at the same time press somewhere else on the screen to activate another button. Your tutorial while good suffers the same problem when tested on iPhone. IE. when you are controlling your car with the joystick, then press another button (I added one on the other side of the screen) the joystick registers that you have pressed the far side of the screen and the car zooms to the right, even if you are holding the joystick left :(


Yes, Kodo's experience is right.
I plan to use my left finger to control a spaceship with drag and drop.
and my right finger to use a bomb with a button.
Then, if I put two things in the same time. Then, the problem is up.
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby Game A Gogo » Sat Feb 05, 2011 7:57 pm

Have you tried doing actor.xmouse and actor.ymouse, maybe that could work? of course change actor for the joystick actor...
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby sonicfire » Sat Feb 05, 2011 11:20 pm

we definately need real multitouch support :)

EDIT: do we have any advantage of using left and right mousebutton events/clicks? would this make multitouch work better in some way?
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Re: Quick question about iPhone's multi-touch

Postby sonicfire » Thu Feb 10, 2011 12:07 pm

anyone knows if makslane is still around?? haven´t heard from him for a long time now :(
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest