Director Class: Touch Responds on Android Device Seems Slow

Hi guys,

I am creating my interactive book app for Android tablet using Corona SDK and Kwik, which means no-coding involved. I have noticed that the transitions between pages are a little slow. Another word, it’s not happening instantly. So far, it took about 2 secs to change the page. I have reduced the size of my PNG files significantly and there are no audio files yet.

My test device is Acer A500 tablet, and it specs are equal those of Samsung Galaxy Tab 10.1. It was tested on ICS 4.03.

I edited the transition parameter from director:changeScene out so there are no transitions for my book app. The result took almost the same time with transition added, which is less than 2 secs and a tiny bit faster. That’s all. Imagine the transition speed once I add everything else later :frowning:

I’m now convinced that it’s not the slow transition, but the responsiveness of the touch event. As I tested the app, the transitions were really smooth, but it took some seconds from the finger touching the button to the time it responds to the touch and fire the transitions.

Anyone experiences this?

Thanks a lot [import]uid: 146445 topic_id: 26475 reply_id: 326475[/import]

Noticing the same thing on a Galaxy Tab 7". It’s way too late in the game for me to refactor to use storyboards, too.

Question is, is this director or Corona on Android? [import]uid: 58455 topic_id: 26475 reply_id: 109431[/import]

I am having this same issue, and i just finished my game so there is not much i can do about it. [import]uid: 126161 topic_id: 26475 reply_id: 109432[/import]

That isn’t a director issue, but merely the app taking time to load the next scene. If you were to make a sample app using director but have hardly anything in each scene the transitions would be really quick.

I presume you don’t notice this on iOS because that generally runs corona much more smoothly, whereas Android just generally struggles in most respects.

Im not really sure how you would go about speeding it up… Are you using the newImageSheets and image groups at all? That should help a bit. [import]uid: 69826 topic_id: 26475 reply_id: 109455[/import]

Oh wait, you just said your using kwik… So ignore my comment about newImageSheets and ImageGroups, i don’t know kwik and don’t really know what it uses! :smiley:
[import]uid: 69826 topic_id: 26475 reply_id: 109456[/import]

Fixed mine to my client’s satisfaction by upgrading to the latest build (826) and by eliminating the hi-res background images (only use one size, now). The backgrounds are simple rendered gradients, and any degradation in image quality from the upscaling is not noticeable.

I also noticed that fxTime for transition.to() is hardcoded to 200 ms in director.lua. Anyone know if that is the standard transition delay in apps? If I cut that in half, scene changes are a lot snappier. [import]uid: 58455 topic_id: 26475 reply_id: 109573[/import]

Upgrading to the latest daily build (828) fixed the issue. It still takes a second or less to change the scenes, which means it’s still not happen instantly. But it’s much better than before.

@davemikesell: could you please tell me the exact lines in Directer Class that you changed the 200 ms?

Thank you :slight_smile: [import]uid: 146445 topic_id: 26475 reply_id: 109796[/import]

I have director 1.4 and changed line 98:

local fxTime = 100 --200 [import]uid: 58455 topic_id: 26475 reply_id: 109798[/import]

From my experience, fxTime is the time the transition takes to complete, if you do a search you will see fxTime is used as the time = variable in all transition so it should not have anything to do with the time it takes between the touch and the transition starting. This will only change the speed of the actual transition. [import]uid: 126161 topic_id: 26475 reply_id: 109803[/import]

Thanks! I did change it and I can see that it’s faster. I tried changing the value to 50 and it’s really fast. Don’t know if it’s a good idea to make it at 50 or not. If it’s not crash my app, I will keep this value. Thanks again! [import]uid: 146445 topic_id: 26475 reply_id: 109804[/import]

I agreed. The newest daily build plus reduced fxTime is helping. I learned that if the fxTime is too little, the transitions will be too abrupt as well. So the timing for the transition is important.

Each newer daily build will normally fix the touch issue so we’ll if the newer one fixes this issue for good. [import]uid: 146445 topic_id: 26475 reply_id: 109806[/import]

Woot thank you helped with the issue i was having too :slight_smile: [import]uid: 75844 topic_id: 26475 reply_id: 112570[/import]