Problem With Simultaneous Multi Touch
Hello,
I am creating a game in which you control 2 players and for that there are two joysticks on the screen that control each of them. At first I thought it was going to be easy to implement this mechanics but I ended up suffering from the multitouch part when you need to map the joystick to the next available touch according to the order of the pressed joysticks. I researched a lot and what saved me was the Multi_Touch Template created by @The_Gamesalad_Guru that has the function of returning the next touch available on the system. Using this logic, I was able to make the joysticks work independently by mapping the touches correctly in the order they were pressed. However, this Guru template does not work when joysticks are pressed at the same time as the device understands this as a single touch and joysticks no longer function properly. For this error to happen both joysticks have to be pressed at the same time, which is not a common situation, but I realized that while you play the game eventually it happens and can get quite annoying.
I saw in a post on this link (https://forums.gamesalad.com/discussion/46765/2-free-dba-multi-touch-templates , scroll down a little) that The Gamesalad Guru commented about this error. His words were: "when you touch them all at precisely the same time the software sees it as a single touch". I don't know if he managed to solve the problem but I believe he never released the template with this correction update, which I found here: https://forums.gamesalad.com/discussion/89107/free-multi-touch-template-from-the-guru
I tried to solve it on my own but couldn't.
Moving on, I tried using two more templates that work with this: TheOfficial Cross-Platform Controller Template found on Gamesalad documentation page and the Dual Joystick Template that is available for free on GS Marketplace. Both also work with multitouch and use a different logic from the Guru template (and much more complex). I did some simulations and realized they have the same problem. In fact, the Guru template responded even better to this situation.
I really don't know what to do. I would like to know if anyone knows if Guru has released an update of his template correcting this simultaneous multitouch glitch or if anyone has gone through this problem and was able to solve it. I'm surprised that this turned out to be a big issue, as two on-screen joysticks are not so rare in mobile games. I would love to meet someone who made a game on Gamesalad with two simultaneous joysticks and had this problem and I also would like to know if that person was able to solve it or not.
I did several tests on iPhones and iPads with Gamesalad Viewer with all 3 of these templates and they all have the same simultaneous mutitouch problem.
Thank you very much if anyone can help me.
Sorry if there were any grammar mistakes.
Comments
There is a fundamental flaw in GS's implementation of multi-touch. Guru and I both developed multi-touch templates at the same time, independently, and we both used different methods. Both suffered the same fundamental flaw. As does every single other multi-touch project out there, unless someone came up with one I didn't see.
Here's how I originally explained it to Guru when we first started discussing it:
Not that it'll help as it too has the same problem, but here was my multitouch demo.
In the end the problem isn't as big with two joysticks as you might assume. I found in actual play that the bug rarely caused issues.
I don't actually think this is an insumountable problem, but nobody has yet to crack it.
Edit: My method seems less reliable than it did years ago. I might have a quick dig into this again.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Thank you so much for sharing your template @Armelline ! I will definitely try to implement it on my game and see how it performs.
But based on what you said, I’m afraid there’s nothing I can do, right? Since it is a fundamental flaw in GS's implementation of multi touch that nobody has solve it yet.
Anyway, thank you so much for clarifying this for me because it was driving me crazy. To be honest I am a little discouraged from continuing to develop my game since I know now that the final version will have this bug.
You said that with just two joysticks it isn’t a big problem but at least every couple minute when I’m playing my game, I eventually press the two joysticks simultaneously, the bug happens, my player movement goes crazy and I lose the match. So, for me it is pretty annoying. Maybe it’s my style of playing. I’ll let some friends of mine play my game without commenting about this issue and see if they eventually evoke the bug unintentionally just like I do.
Or maybe I should just completely forget about the joystick and try a different type of movement mechanics. I guess the traditional up, down, right, left arrow keys won’t face this flaw, right? But it will limit the angle of movement of my player, and the gameplay won’t be as smooth as using the joystick movement. I guess I’m stuck…
No no don't implement mine, it also has the same problem I only added it so you can see another failed attempt
I made one this morning that's better (more reliable anyway) but when inundated with fast overlapping touches it too fails occasionally. I'll try to make it rock solid but if I can't I'll send you it anyway so you can see if you can do better. It's definitely better than my old one or the ones you mentioned, though.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Ok @Armelline , thank you so much for taking your time to try to resolve this issue.
I am looking forward to this new version of yours.
@Orbacs I wrote a multitouch system, its only single joystick but it seems to handle multiple simultaneous touches just fine and you should be able to expand it. Haven't looked at it in awhile, but I believe it is unique to others i've seen. Might be worth a shot.
Follow us: Twitter - Website
Same problem sadly, for the same reasons.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I'll take a look. Thanks a lot for sharing, it's always great to see different approaches on the same topic.
If you have the joysticks on seperate sides of the screen you could include conditions that include where the touch is happening. Aka create two seperate sets of multitouch based on screen position?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Another though might be to add a .01 delay to one of the controllers touch response? Been a long while with me using GS so just throwing out thoughts.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Hey @The_Gamesalad_Guru thanks a lot for replying! So glad to see that you’re still around! 😀
Sorry for the late response (I’ve been using my second account).
This sounds interesting, since my joysticks are indeed positioned at opposite sides of the screen. I’ll give it a try! I’m currently using a template made by @Armelline (thanks again!).
It doesn’t fix the bug, but has a amazing performance and tops the others I’ve tried so far (although I noticed the performance gets a little bit worse when implemented in the game compared to the solo template, have no idea why).
Almost finishing my game. Still got some minor things that need to be done. After that I’ll go back to the multitouch issue and try your suggestions. I’ve come across many challenges during my time with game development with GS, but this was the one that gave me the worst headaches. 😣
Thank you again for your reply!