Buttons Not Responding (Android)

Hello guys.

I just published a game on Google Play Store and I am getting feedback that buttons are not responding.

The conditions is:
When cursor/touch is on the button

Sub condition:
touch/left mouse button is down

Action for the sub-condition: simulate pressing right for the player

I don’t know why this is happening. When I export the APK, these buttons are working. But when I export it as a bundle for publishing on Play Store, the button is frequently freezing.

You can try the game here for confirmation: Rabbit Rambles 2D Adventures - Apps on Google Play

Hello guys.

I talked about this issue to some developers outside of Gdevelop. They told me about this issue could be related to sensitivity problems. Like, it is working on some devices and some devices not. This is a bug. Is there any method to increase or decrease the touch sensitivity?

Hello MaheshPanth,

When I press the jump button while I’m walking and release it, the character also stops walking even though I’m still holding the arrow. I did a test here and it happens in the same way:

I think you need a multitouch in your project. Here is a link to an example: Multitouch - a game example from the GDevelop game making app | GDevelop

And here the tutorial in youtube: How To Make Multitouch Controls For Platform Games In Gdevelop 5 - YouTube

I never used the multitouch extension, but maybe can help you.

1 Like

I think the engine needs to update the touch system and test it with different Android versions and models because the touches are working fine when I tested it with models such as Redmi Y3. I tested it with Redmi Note 7, and there were slight problems with touches, and when I tested it with Redmi Active 9, there were complete errors, like they were not even working. There’s a difference between testing the touches with an emulator and testing the touches with a real hardware device. I tested them using real devices and got the issues. I know GDevelop is an open-source community project, but somebody needs to step up, and do these testing on different devices without using an emulator but by using real hardware and fixing these issues. This is a legit bug that I can confirm. These issues need to be fixed to make GDevelop live up to expectations. Otherwise, people already know that there are many high-quality alternatives such as Android Studio, Godot, Unity, Unreal Engine, and so on. But if GDevelop wants to compete for these with alternatives, this issue must be addressed.

Anyways, thank you for your response man. I will definitely try it and let you know the outcome.

Hello again, I checked the video and found that the instructor in that video is using the deprecated version of the MultiTouch extension. Some of the features shown in that video are no longer available in the new version of the extension. Moreover, the tutorial is about creating a joystick that triggers wherever you touch the screen. Meanwhile, I have the buttons already placed on my scene. How does this help with my case? That tutorial is over-complicated.

For example, there is a condition called “A touch has ended” in that video. While I do that with the new extension, there are more parameters to enter. When the touch has started, we don’t get to enter the identifier for it. But when the touch has ended, we need to enter the identifier for it. What identifier should we enter when the touch has ended? There are plenty of updates to the extension and the tutorial that you shared above is simply outdated.

I don’t want to add the touch controls everywhere on my screen. I just want the touch to work when clicking on the specific buttons placed on a specific position on the screen. How do I make this possible with the multi-touch extension? The tutorial you shared above is different than what my actual problem is.

Can you please explain or simplify the logic of the multitouch process? how does it work in general?

I’m sorry, MaheshPanth. I didn’t realize the tutorial was out of date. The link to the example I found on the official Gdevelop website and that’s why I also shared this video on YouTube too. As I said before, I’ve never used the multitouch extension, but testing your game here and realizing that when undoing a touch the others touchs were also undone, I imagined that you needed multitouch on your project (not necessarily the extension, but maybe some events).

My suggestion was for this specific issue I experienced and related during your game. If your touchs are working fine like you said and the problem is just with some Android versions that they are freezing I don’t know how to help you. Only thing I can say is that here in my smartphone worked without freezys.

But again, I’m sorry if the tutorial wasn’t helpful to you because it’s not up to date. I’ll be more careful next time.

1 Like

Thank you first of all for your kind response.

So, if you haven’t worked with the multi touch extension, is there any alternative solution to simulate the multi touch or anything like that which could possibly fix the problem?

Thank you.

1 Like

I think you could remove the condition “Touch or left mouse button is down” and make this:
image

This action at the beginning of the scene will make cursor and touch independent. Here is working fine. Now when I end a touch it not end another touch that still there (I think you understand what I mean).

2 Likes

No because I have already tried that. If you do that, the outcome will be that the player will keep moving even if you release the touch unless you activate the touch on another button. For example, if I press the right button, the player will keep running towards right and will not stop running even if I release the key. So, the condition touch or left mouse button is necessary. But I will try it again and let you know.

That’s true, but I think it’s because the cursor stays on the button when you tap it because the cursor move to where you touched. The condition for moving the player is “Cursor/touch in on…”. With the first condition at the start of the scene you will be disabling that the cursor move to where you touched. So, when you release the touch the cursor is not there and the button is free.

1 Like

I tried this and it does mostly work except if my buttons (all 80x80) were about 200 pixels or less from each other.

So like this if I’m pressing the right button and without lifting it press the left button then release the left button, whenever I next release the right button he continues running and I usually can’t make him stop after that, although it seemed that the more time passes between releasing the left button and the right one, the less long he would run after releasing the right one.

Same thing if it was the jump by one of the movement buttons. Then touching jump while pressing the run button near it and releasing jump and later releasing run would make him keep running. This was in the preview though I didn’t try it on a device.

Well just made an apk for my phone and I can’t tell if it works like that on my phone at all because for some reason the left arrow does not work. I have to feel around for a spot to the right of the left arrow and can sometimes get it to move that way. The project has scale width to fit on so I don’t know if that has something to do with it. The other 2 buttons work fine.

Ok I figured out what the left button being unresponsive was, It’s near the area where the camera cutout is, so even thought it was visible that must have prevented touches. It’s half in, half out of that area and that’s why searching to the right of the button, the part outside the area, could make him run left. Flipping the phone so that it’s not in that cutout area then the left button works fine, and the issue I had in the preview does not happen on the phone either.

2 Likes