Corona SDK Lag on All Devices? - android

I've been using Corona SDK for a little over a year at work now, and one thing that I've noticed is that there is a significant lack of 'smoothness'. I've used it to make a range of games and business apps, and anything that has to do with animation of some sort (ScrollView, TableView, Transitions etc.) never runs smoothly compared to, say, a ScrollView in native iOS development.
Does anyone else experience this? At first, I thought it might have been my code's fault, but after creating a plain project with only a ScrollView widget and it still lagging, I really didn't know what to do anymore. I've also tested it on multiple devices, including the iPhone 6, iPad Air and Samsung Galaxy S3.
Now, my main question is if there is anything I can do to make these widgets and transitions run more smoothly. I personally love the productivity I have when using Corona and the last thing I'd want to do is to abandon it, but it really is quite embarrassing when you're dealing with a client and they utter an unimpressed "mmh okay" because the app just doesn't run as well as it should!

Related

Android game GPU compatibility issue

my first android game it's almost done, and I'm on the way to publish it on the play store.
Today I tested it on some friends phone and it worked on all except for a samung a5. On this phone the meshes flicker, apper and disapper and look deformed. This when playing game where I use a lot of frame buffer, in the main menu where there is a simpler animation everything look right.
The game is developed with libGdx and use some custom shader. I've tested it on 8 other different device without no issue (excepect for low frame rate on samsung galaxy tab s4).
I ask yours advise:
1) what should I start to check to find the problem with a5?
2) do you think I should delay the publication until the bug it's solved ora I should publish it excluding A5 ( or maybe all devices with similar GPU) from compatibility list?
My big problem is that at the moment I don't have the device with me (it's the personal phone of a friend of mine...) and probably I will have it for only a limited amount of time, so I want to be preparated to avoid to lock the device for too much time to my friend.
Thanks to all!
First, I'd make sure you don't have any OpenGL errors - add calls to glGetError and validate frame buffers and shader programs, you can do this without the device and adding extra asserts like this is always worthwhile (assuming you don't already have them). Next, try using the tools provided by the GPU manufacturer. In your case the snapdragon profiler. To minimize the time you'll be using your friends device, get the tools installed ahead of time and if you have access to another Qualcomm device, then use that to familiarize yourself with the software. With luck the cause of problem might become immediately obvious. If not, then it's just a binary search of disabling parts of your code until you narrow it down to a particular shader/draw call, then examine/tweak that to figure out what bit is going wrong.
That's a tough call. If it's a driver bug, then it might only occur on particular revisions. Some A5 devices might work if they're on different versions of Android from your friends device. That said, the A5 is relatively recent and Samsung/Qualcomm drivers tend to be pretty solid IME, so it's more likely an error in your code that happens to only be exposed on certain devices. Personally I would delay release unless your release strategy is timing sensitive, from the limited data you have, your game doesn't work on >10% of devices.

Android Performance issues in Sencha Touch - Cordova App

I am using Cordova and Sencha Touch 2.3.1 to create both Android and Ios apps. The performance of the IOS app is quite good however the android app performance is very sluggish.
The home page comes is quite good shape but as soon as I open any other page the entire font as well as screen color etc becomes dull and screen response time becomes very high.
Any solutions or pointers will be highly appreciated.
I am using:-
Sencha Touch 2.3.1
Corodva 3.3.1-0.3.1
adt-bundle-windows-x86_64-20131030
Sencha Cmd v4.0.2.67
Part of the issue may be that iOS has a dedicated GPU and compiles mobile Safari with GPU acceleration, whereas most Android devices don't.
There's going to be a lot of potential answers to your question, it's likely that in some or a few ways that your application isn't following best practices which may be causing it to run slowly. The DOM might be too large, you could be instantiating things when you don't need them and forgetting to destroy them and a whole bunch of other stuff. There's a great video about Sencha Touch best practices I wrote a blog post about here: http://www.joshmorony.com/top-10-tips-sencha-touch-best-practices-review/

Differences and advantages of using libGDX or Android SDK?

Which are the main advantages of using libGDX? Is there some difference between libGDX and Android SDK, or libGDX is just like a framework that uses Android SDK? Which one you advise me to use?
First of all i want to say, that this question is a bit opinion based and so i think it will be closed soon. Anyway i want to point out an important thing:
Libgdx is a crossplattform framework. You can develop and test 99% of your game on desktop. Then add aview code lines and it runs on android to. The only difference between the android app and the desktop version are then the Sensors and the Touchscreen. You may also get problems with the Screen sizes, but for this there are solutions you should take a look at.
I never worked with the android sdk, but as much as i know you have to use the emulator or your phone for testing. So the testing process is really slow and annoying.
And also if you want to develop for Android phones only, why don't you spent 5 minutes in thinking about how to controll your game on desktop and add those few lines?
Thats the thing i wanted to point out. The rest is up to you.
Maybe you want to take a look at the video on this page.

PhoneGap - Bad Performance compared to Browser on Android

I developed an application for android using jquery mobile and phonegap.
I deployed the app to my device over usb. The performance of the app ist really bad, especially while scrolling a longer list.
The strange thing is: The whole app runs smooth if i just open up the browser on my phone and access the index.html directly. Same technology, same content. I do not use the phonegap native api or anything similar.
Tested with phonegap 1.5.0 and 1.7.0rc1, jquery mobile 1.1.0 on android 4.0.2.
Any ideas?
On honeycomb (3.0), Ice cream (4.0) and posterior devices, you can boost performance by adding the following in the < Application ... > tag:
android:hardwareAccelerated="true"
You could set the minSdk to 8 (Android 2.2) for compatibility and the targetSdk to 15 (Android 4.0) and that would make hardware acceleration work when its available on the device only.
I believe that with this flag the performance of my apps is equal to running them in the browser, so I guess its because the browser was coded with hardware acceleration :)
I had a similar problem: a page with a longer list of "medium complex" themed divs. The browser of HTC phone had no problems in displaying. But within the phonegap app rendering failed completely. I saw a kind of WSOD, which disappeared only after touching the display. After touching, the page was displayed correct.
The problem was not in place, when I shortened the div-list to one or two div-elements or when I reduced the sub elements within the divs and reduced the render effort caused by the css complexity.
The white screen looked like, if the whole body was invisible, since only the documents background-color was displayed (I added a light pink for this). So I guess, the rendering was the problem after reading this thread
I tried the various proposals I found in this thread to make the app work without the "WSOD". But nothing worked. Some of them made the app displaying really worse.
Finally, after a whole day of searching, I made it. I set within the tag (not the tag) of my AndroidManifest
<application android:hardwareAccelerated="false" ...
Now the app behaves in the same fast way as my webbrowser. Seems like, if hardware acceleration is not always the best feature...
My versions:
phonegap 3.5.0, Android 4.0.3, jQuery v2.1.0, HTC Sense 3.6
Found an answer here: http://groups.google.com/group/phonegap/browse_thread/thread/94da1cf881abe995/6d4f7aea7aeba523?lnk=gst&q=performance
There is probably a difference between the native browser and the webview in terms of javascript performance.
If you can confirm the browser performs better (that it's not something suboptimal in your code frustrating one but not the other), you could consider deploying as an html5 offline application so that you will actually run in the browser.
We bumped into performance issues while scrolling the same amount of list items with jquery mobile. The performance was so poor (we didn't even try in PhoneGap environment) that we rewrote the app using iScroll library... now the app scrolls really smoothly.
If you are at the beginning of the development, you could try to change the UI library.
After this situation we deploy our apps to test devices quite often to manage performance issues in time... this became a "policy" :)

Webb app performance android

I'm developing a webbapp for iOS and Android, primarily. The problem is that it tends to run slow on the android phone (testing made on Samsung Galaxy S2). I've tried a couple of different frameworks together with PhoneGap without any good result.
My experience this far (on android):
Dojo toolkit: (v1.7.1)
Pretty good but flickers alot when doing transitions between different views and the input forms performs badly.
Sencha Touch: (v1.1)
Not very responsive and flickers a bit during transitions. Changing orientation takes awfully long.
JQTouch: (beta 4)
Runs smooth but the layout is broken on android (back-buttons etc that uses CSS transform rotate and translate)
My question is:
Have any of you found a framework that works well on both iPhone and Android devices? or is the only solution to develop native?
On a side note I've noticed that Sencha touch 2.0 has focused on Android performance but there's only a developer preview available at this time and is not going to be release before Q2 2012.
What I have found is that many of the frameworks work just great but the root cause of the problems is earlier versions of Android's support for CSS3 style transitions. You are probably better off avoiding or disabling these transitions.

Categories

Resources