IOS 10 issue with scroll ontouch

IOS 10 issue with scroll ontouch
0.0 0

#1

@slackmoehrle

Hi, I found following discussion with input lag problem:


https://forums.developer.apple.com/thread/62315

It seems in IOS 10 when touching screen and scrolling u get somehow feel that game running on 20fps not 60, scroll and all animations durring touch events get low fps feel. It is ok to be IOS 10 issue, but seems Unity have fixed that issue somehow - we see in many games scrolls works smooth on Unity - but not in cocos. Could you please ask someone to check this - it’s is 100% reproducible issue with any scroll.


#2

absolutely. Thanks for bringing it up.

Can you provide any advice on this thread? How to split screen or have variable layer size


#3

From unity:

https://forum.unity3d.com/threads/ios-10-touch-input-lag-on-64-bit-devices.442665/

and fixed unity bug;

Same was with Supercell games and they also fixed that issue:

https://forum.supercell.com/showthread.php/1261239-Lagging-!!!-After-ios-10-update


#4

I’m testing a game with a scroll view made with Cocos2d-x 3.14 in a device running iOS 10.2.1 right now and I’m not experiencing any issue. 60 fps as always.

Edit: I’m talking about cocos2d-x’s built in cocos2d::ui::ScrollView class, not Apple’s UIKit one.


#5

hmm, good to know. Thanks for chiming in.


#6

Ok, so I recorded video in slow-motion to show how it looks - it’s hard to record default video as 30 fps not enough to show difference.

Best you can see on 8s when I’m swiping up -> there is big jump in text display and 2m 19s when it goes smoothly.

https://www.dropbox.com/s/dkliybbipcj9sh0/trim.497164C7-01ED-46D2-99DE-59C52922BF25.MOV?dl=0

After scrolling for few seconds down& up at some point scroll started to work like there is 20fps - text jumping - you can see until 1.40 m that text when scroling jumping like 6px to next position, after I opened bottom bar( IOS control panel) on iphone - scroll got back to 60fps. In slow motion it looks like text jumping for 1px not 6px. This fps drop happens only when you touching with finger screen and making up or down slides, when u releasing finger scroll looks fine until u again touch screen.

UPDATED:

I seems found best way how to reproduce it, open Cocos2d-x cpp test app(in portrait mode) with that menus in scroll, click any of menus option to change scene and then after 1-3 second click back button to return to menu scroll -> when trying slowly scroll down or up(hold finger on screen all the time) you will see scroll lagging like there is 20fps - if you open and close IOS control panel -> scroll back to normal or randomly itslef goes to normal state- until again clicking menu option-> back and again scroll starting to lag.

It even looks that not scroll lagging itself but touch events are sent with delay and like interrupted all the time -> so text seems jumping thru skipped pixels when making scroll and it makes 20fps feel as it is not smooth.


#7

@slackmoehrle

can someone confirm that can reproduce this issue as it clearly visible on any ios 10 64bit device, it seems like issue with cutting fonts which existed from 3.0 till 3.8 and cocos2d-x devs not noticed this - due not releasing really production ready apps and who cares if few pixels of font not visible:)


#8

I created an issue here: https://github.com/cocos2d/cocos2d-x/issues/17405
and internally one of our engineers has been asked to take a look.


#9

I’m also seeing the issue of super laggy scroll views / scroll nodes if that helps :wink:


#10

Hi guys! I have this issue too in all games I made.


#11

I have now measured the timings and it seems like the TouchMove events in the CCEAGLView-iOS come in sometimes with a delay of up to 70 ms which causes the annoying stutter which is pretty much the same as @energyy seems to have found out.


#12

I created a simple demo with GLKView and found that the issue also exists in the demo.
I have tried many workaround including invoking [self setNeedsDisplay] in touchesMoved method.
It seems a bug in iOS 10 system and hard to fix… :frowning:


#13

Does libGDX have the same issue?


#14

Didn’t try libGDX on iOS.


#15

Hi to all,
I have no issue with BMF fonts in scroll views, no issues with images and BMF fonts + scroll. All is smooth.
Tested on iPhone 6, 10.2.1
Maybe this issues is only for scrollview+system fonts?


#16

No u should have it anyway , it just happens after some time. We have app where scroll not involved just aiming like in agry birds and this also causes ame input lags


#17

Hello, our dev installed IOS 10.3 beta and seems Apple fixed that issue with scroll. So probably no fix will be needed on cocos2d-x side.


#18

Thank you for the test in iOS 10.3beta. Good to know that Apple has fixed that problem. :slight_smile: