Game is SLOW when touch and holding screen

I'm using Corona v243, I've built for Android 1.6 and Android 2.2. I'm using an HTC G1 device as the target device.

Whenever I touch and hold the screen in ANY Corona game (Mine, or the Sample Apps) the game slows down to a crawl.

This is totally unplayable. The same game works fine on my iPhone 3G (no S)

This is a critical flaw.

Please help!

I have a droid x and a droid and a nexus....

do you have some some code that i can test that exhibits your problem

c

sure, run the Bullets sample, or the JungleScene sample, probably any sample will work but i've tried those two in addition to my code.

Then press and hold the screen while it's running and notice how slow it gets while your finger is on the glass.

Also, the Fishies and Chains demo show off the problem well.

i have two devices here with me. droid and droid x running 2.2 - i can't reproduce the problem.

c

They mention the same problem in the Android forums. Apparently touch events are being delivered ~ every 1/10th of a second and that is killing the frame rate on older devices.

Please read this:

http://stackoverflow.com/questions/792185/why-are-touch-events-destroying-my-android-framerate

Is it possible that the Droid and Droid X are so much faster than the G1 that you are not perceiving the problem but it's still there, just imperceptible to the human eye on fast devices?

The game runs silky smooth so long as I don't touch the screen, of course that is totally unusable since the player needs to be able to provide input.

I've even tried overclocking the G1 to 614Mhz (stock is 528mhz) and still, all corona games are dog slow. Other non-Corona games from the Marketplace run fine while I touch the screen.

This problem happens on Android 1.6, 2.0.1, and 2.2.

Is there a G1 you can test on?

I'm stuck. Help please.

Would it matter that I'm using the debug signing keys that come with Corona? I don't see how the keystore that I use to sign it would matter, but I thought I'd throw that out there just in case... ???

Here is a video of the problem:

http://www.youtube.com/watch?v=fxSoUdAejeA

bump

this is a critical problem, please help!

scheduled for review and see if we can figure out a fix ...

I had the same problem while testing on ipod 2g, even if not that bad as you describe it on the android.
I thought it's because while you're touching the screen, the "garbage" starts to add up really fast, and the work that the garbage collector does is really heavy for older devices, like my poor iPod (on my iphone 3gs no problem at all). You have to play around with garbage collector's settings.
In my game, I just added those two lines in the enterFrame loop:

1
2
collectgarbage("step", 0.7);
collectgarbage("stop");

Thanks for your suggestion H4ch1, unfortunately it doesn't seem to fix the problem on Android :(

Strangely enough, on my old iPhone 3G (no S) it my game runs just fine, even without the hack you mentioned. No slowdown at all when I touch the screen.

It almost seems like under Android the touch events are clogging up the cpu.

Hew, that's bad :\
Maybe something like the accelerometer intervall is needed to not get too much calls? If that's even possible though.

ps: been monitoring this thread and we have been running test on our devices ... it is a combination of a fix and android --- we are figuring out a fix ... and i hope to have an answer soon

c

Thanks Carlos,

In addition.. I sent a bug report a while back regarding an issue on Android where you open an html page in a webPopUp and are unable to get the virtual keyboard to appear when touching a form field inside the loaded html page. I never heard anything further about that issue.

(Case #2514)

Thanks.

Im having the same issue. Im using a G1 too with Android 2.2.

This was fixed in the daily builds, but it broke performance on droid 2, droid X and Nexus S.

I'm waiting eagerly for a fix, since i'm now beginining to get seriously bad ratings by people on the market :( I mean how can it not work on googles flagship phone - then Nexus S :/

This is good to know ... I have a hunch that I've run into this same issue ... although, it's just nice to see that these things are being addressed.

I can't wait to successfully reproduce my App on my PHONE as it looks in the simulator!

Heck - I'd rather the simulator look as bad and slow as my app on my phone :) (G2) - just for consistency.

What's the status on this issue? I'm running into it running a device with 1.6 on it. The build runs great on iPhone 4 but anytime I touch the screen on my Android device it slows down to a crawl. Is this fixed on a daily build? If so, I may purchase Corona earlier than I intended to just so this goes away and I can continue development.

I should also note that I removed all event listeners for "touch" and "enterFrame" and if I still touch the screen, it crawls.

Did you see my Android update?

http://developer.anscamobile.com/forum/2011/03/01/android-update-please-read

Our early users of Android 2.2 for ARM7 builds show a 50% increase in performance.

C

Yeah, I just got done reading it and was going to come back and say "never mind". Now I just have to get a hold of a 2.2 or better device. Not sure how i'm going to do that :-)

Thanks

I'm developing with the Target OS Compatibility set as 2.2.

I can assume that despite this, your proposal is more than just a target OS compatibility -- it's fully embracing 2.2 as the base, which in turn will allow Corona Apps to be much more optimized.

If I'm on base, then I would like to honestly say that it wasn't clear to me from your post.

I took away that apps developed with compatibility for 1.6 and other lower versions had poor performance, and kept the assumption that 2.2 should run fine.

I did the same and had the same experience.

If I might say -- the advantage of allowing registered users to download daily builds is nice -- but at this point in Corona's development -- people who have not purchased Corona are people who have not committed to Corona.

I am looking into a few other options, simply because I have a task that I need to accomplish and based from what I can see with the Corona SDK demo -- my app is not working out on Android.

With daily builds that are still under the same limitations, this would increase my loyalty to Corona and my desire to purchase the SDK upon completing my app.

I don't think that daily builds is an incentive to register. I think wanting to publish your app is :)

I agree with what you're saying - I think the problem from their aspect is it would cause a support nightmare. All the n00bs would download the last daily, and if there were a bug it would fill the bug base and more likely forums.

Then you'd get all those people complaining that there's no documentation for the feature that was added last night :/

There should probably be more regular release builds instead I think. To me it looks like most dailies have less bugs than the last release.

touch and holding screen still is a big problem with CORONA Android.
We still facing this error with lastest daily build and Android 2.2 device.

Should we create some kind of device black list for faster testing purpose?

having tha same problem here, with a pinball-like game.
When you touch and hold in place the string, (but i think more when you go offscreen with your finger), the movement of the ball is slow and jerky, like a major lag.
What i have seen too is that the simulator on Mac is fluid, but the one on windows is lagging. An OpenGl issue?

yo do not have the updated ARM7 build. We have not released it yet. So you are still having issues. We fixed a bunch of this stuff. But the ARM7 2.2 is *not* on the daily build.

http://developer.anscamobile.com/forum/2011/03/01/android-update-please-...

C

I'm having the same issue in iPod 3 with iOS 4.3.
I'm drawing an line based on the touch points and there is a delay starting to get the touched point.

I'm will prepare a sample code to post here.

views:2459 update:2011/10/8 15:12:54
corona forums © 2003-2011