Touching screen is killing fps

Monkey Forums/Monkey Programming/Touching screen is killing fps

erebel55(Posted 2014) [#1]
In my game, when the user touches the screen it is slowing down the fps by a huge amount on some android devices.

I'm not sure if this is limited to android, which is why I didn't place this in the android forum. I haven't tested on ios devices yet.

The very odd part about this is I commented out my only TouchDown/TouchHit calls and the problem persists. I am not doing any MouseDown/MouseHit calls or any other screen input calls.

Also, this only occurs on one of my android devices which is running on an old version of the os.

Here are my test results..

Device 1
Android 2.3.4
RAM = 250 MB
Resolution = 401 x 320

Not touching screen = 50 - 60fps
Touching screen = 24 - 33 fps

Device 2
Android 4.1.1
RAM = 1 GB
Resolution = 1024 x 600

Not touching screen = 49 - 50 fps
Touching screen = 49 - 50 fps

Device 3
Android 4.2.2
RAM = 2 GB
Resolution = 1920 x 1080

Not touching screen = 58 - 60 fps
Touching screen = 58 - 60 fps

It's very odd because I have commented out all of my touch input checks..

I am currently working on putting together a stripped testbed for this, but I thought I would put this out here to see if anyone else has seen this behavior before. I will post my testbed when I'm finished. (I am using autofit, but doubt that it could be causing it)


Volker(Posted 2014) [#2]
A known issue on older devices. See here:
http://www.monkeycoder.co.nz/Community/posts.php?topic=227


erebel55(Posted 2014) [#3]
Thank you Volker, that post says it is under a hidden forum for me.

therevills were you able to find a workaround for this? If so could you please post an example?


Difference(Posted 2014) [#4]
I just had the ""flooding of motion events" problem on iOS. Adding #IOS_ACCELEROMETER_ENABLED=False fixed it.
Maybe your problem is similar?


erebel55(Posted 2014) [#5]
Well it looks like it is a known bug for older versions of android, but I wanted to know if therevills had found a workaround. It sounded like he had.


erebel55(Posted 2014) [#6]
therevills?


therevills(Posted 2014) [#7]
therevills?

Sorry I've been busy with other stuff... and please don't push me into answering your questions or I will ignore them in the future, also I don't view every post on these forums.

When I investigated this with my old phone (LG Optimus One P500), it was really bad when pressing the screen especially with Mojo Android Canvas target - with the Android OpenGL target the issue is a lot less and even nearly goes away with Android 2.3 onwards.

Basically if you've got a crap device touching the screen will hurt performance. Looking at the stats on the Android market you will "only" lose <20% of the market if you exclude pre Jellybean devices:
http://developer.android.com/about/dashboards/index.html?utm_source=ausdroid.net

Or design your game so you don't have to touch the screen to often ;)


erebel55(Posted 2014) [#8]
Sorry, I wasn't meaning to push. I just wanted to make sure you saw it; won't do it in the future.