Trying to solve the joystick problem...
LordTarantor
Member, PRO Posts: 890
Hi everybody:
I create a demo to show the actual problem a lot of people is experiencing with the joystick in games that have other buttons to do other things like fire shots or in my case, do other kind of movement.
This is the url: http://gamesalad.com/game/play/79702 but I recommend to go to the share project, download: annoying touch and play it with the game salad viewer so you can see the actual situation. I made the touch actor bigger so you can see where the touch is at every moment. the problem happens when you press a button and keep it press before you hold the stick. If you move the stick while holding the other button the stick will only move to the direction of that button.
I think that in order to avoid the conflict the game.touches.touch rule need to be constrained to the first half of the screen since the buttons are on the other half. I just don't know how to do this.
If you see the share project there is a second scene and I did this one following the idea of aracknor of creating a joystick using other rules. so instead of moving the actor with the joystick itself it will collide with actor that have movement rules in them. As I am trying to explain this I just realized that it wouldn't either because the touch thing is affecting the joystick not the moving actor.
Please everybody lets try to fix it. This is a problem that I have seen in every GS game that I have from the apple store and in every demo I downloaded from the shared projects.
One more thing we fix is one less thing the game salad haters have to criticize.
I create a demo to show the actual problem a lot of people is experiencing with the joystick in games that have other buttons to do other things like fire shots or in my case, do other kind of movement.
This is the url: http://gamesalad.com/game/play/79702 but I recommend to go to the share project, download: annoying touch and play it with the game salad viewer so you can see the actual situation. I made the touch actor bigger so you can see where the touch is at every moment. the problem happens when you press a button and keep it press before you hold the stick. If you move the stick while holding the other button the stick will only move to the direction of that button.
I think that in order to avoid the conflict the game.touches.touch rule need to be constrained to the first half of the screen since the buttons are on the other half. I just don't know how to do this.
If you see the share project there is a second scene and I did this one following the idea of aracknor of creating a joystick using other rules. so instead of moving the actor with the joystick itself it will collide with actor that have movement rules in them. As I am trying to explain this I just realized that it wouldn't either because the touch thing is affecting the joystick not the moving actor.
Please everybody lets try to fix it. This is a problem that I have seen in every GS game that I have from the apple store and in every demo I downloaded from the shared projects.
One more thing we fix is one less thing the game salad haters have to criticize.
Comments
However, you never know which touch will be touch 1, touch 2 ,touch 3, etc.
I could touch the fire button first and that would be touch 1
Then I could touch the jump button and that would be touch 2
And then the joystick would be touch 3
Or I could touch the joystick first, and that would be touch 1
Then the jump button, and that would be touch 2
and then the fire button would be touch 3
Because of this, you need to account for ALL 5 touches in everything.
You have to duplicate all of the Rules 5 times for every button, joystick, etc.
Thanks FMG.
Perhaps just add Touch is inside to the Joystick and buttons?
I'll see if I can figure it out when I get some time.