-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stutter on iOS devices caused by touch input events #32139
Comments
Some additional info: the problem is present in 3.2 master branch as well. I tried to comment out some of the code from Godot (hoping that stutter would disappear), but to no avail. The stutter is still present in low-end device (such as iPad Mini 2) when player drags finger across the screen, even though dragging is effectively not working anymore after commenting out all of the following: in /platform/iphone/gl_view.mm:
also in /platform/iphone/gl_view.mm:
in /platform/iphone/os_iphone.cpp:
It seems that I am looking at the wrong pieces of code for the cause of the stuttering issue. Does anyone who is more familiar with the structure of Godot's iOS code know where roughly could the cause be? Where could I look? :-/ |
Can anyone still reproduce this bug in Godot 3.2.3 rc4 or any later release? |
No answer, so closing. Please comment if you can still reproduce it, and make sure that an up-to-date reproduction project is included. |
Seems this issue or something similar is still present in 3.5. Our game uses tap controls, and we're experiencing noticeable stuttering (drops to 56-58 fps) while tapping on iPhone 6s. Whereas skipping the input and triggering the same player movement through code runs perfectly smooth. Also, Xcode shows a memory leak. In a scene containing only an FPS label, the app's memory use increases precisely when tapping the screen and doesn't go back down. It only increases on taps (not hold/swipe), and increases faster as more fingers are used. FPS degrades more and more as the tapping continues, but stays solid at 60 when no input is happening. The memory started at 131 MB and increased to 144 within a few minutes of tapping.It's really a default project apart from the FPS label, but here it is: |
Unfortunately this issue is kinda preventing us from releasing our game, as the stutters are quite bad, and we haven't found any workaround. I went to try and test this in Godot 4 beta 1 to see if it's present there, but the iOS builds are currently broken. I'm happy to poke around myself if need be, but I'm not familiar with the internals here, so any hints or direction would be appreciated! |
Yes, our testing suggests that #69200 fixes this. |
Unfortunately, it seems I was mistaken, or my previous test was a fluke somehow - there is still a serious stuttering problem. In 3.6 beta 1, the memory leak is fixed, but tapping causes FPS to drop significantly (using same MRP I uploaded previously). I also re-tested in 3.5.1 with #69200 and the stuttering is present there too. This is on an iPhone 14 Pro Max. EDIT: tested in Godot 4.0 stable, stuttering present there as well. Is anyone able to confirm this? |
I'll look soon. Will do so on an iPhone 12 Pro. |
I am not able to reproduce so far. (iPhone 12 Pro / iOS 16.3.1) When idle, the label will consistently read 60 or 59 fps. These values are consistent even when rapidly tapping. I added a tap counter and have tested beyond 4000 taps. Do I need to go far beyond this? Possibly related: Xcode gives me a runtime warning that the user interactive thread is blocked by a lower priority thread. I could investigate this lead to see if it addresses the stutter but it would be a blind fix without a repro. |
Thanks for testing! No, there's no need to go further. For me, it's quite easy to get FPS to drop significantly (sometimes even below 50) and it happens right from the start. Here is some quick Xcode profiling I recorded. You can see it starts out normal, with no input. When I start tapping rapidly with three fingers, FPS drops and both CPU and GPU usage increase. Then everything returns to normal after I stop tapping. (this is 3.6 beta 1) Screen.Recording.2023-04-23.at.10.03.19.PM.mov
I've been seeing that as well, could be worth looking into I suppose. |
I suspect the stutter I'm experiencing is specific to devices with Pro Motion display. That would explain why we're not seeing it on iPhone 12 or my iPhone 6s. I've made a new issue #76425 since I do think this particular issue was actually solved. |
That's a very good hunch. I'll keep thinking on it. FWIW, I tested a couple more devices / iOS versions today and couldn't reproduce. |
Godot version:
3.1.1. stable
OS/device including version:
iOS 12 - iPad Mini 2
Issue description:
Game works with solid 60 FPS until player starts touching the screen. FPS drops to approx. 57 once the player starts touching the screen which causes apparent stuttering. Cannot reproduce on an Android device.
Steps to reproduce:
Minimal reproduction project:
Archive.zip
The text was updated successfully, but these errors were encountered: