Page 1 of 1

ZGEAndroid-debug is a bit slow

Posted: Thu Dec 19, 2013 7:11 pm
by airpas
hi
i've noticed some lag (not big) , the animations isn't smooth like in windows , i posted because i've some games run super smooth on my phone .

could this be a lack of performance by free pascal ?

btw : my phone is galaxy S1 advance



thanks

Posted: Thu Dec 19, 2013 8:30 pm
by jonaspm
Do you mean Android?

I was about to ask how to change the API Target, since ZGE (CMD) comes with the following error while trying to compile debug.apk


Also, using ZGE-debug.apk and zzdc.dat crashes with my project under Android 4.3.1

Here is my project:

Posted: Thu Dec 19, 2013 11:26 pm
by Rado1
Hi jonaspm, the reason for compilation error is probably that your Android SDK does not have Adroid 8 installed. Just open the Android SDK Manager.exe and install the Android 2.2 (API 8 ) SDK Platform. Then, you will be able to compile for android-8.

Regarding to performance: of course ARM processors are not as powerful as usual PCs and GPUs on your desktop/notebook machines. To create a well-performed game for Android requires usually certain tuning. Try to reduce amount of models and rendered objects, make optimal algorithms, use OpenGL features of GPU as much as possible, rather than computation in ZGE expressions, etc.

Posted: Fri Dec 20, 2013 3:18 am
by jonaspm
Thank you Rado1, i thought was that... ¿Is there a way to change the API target?

I would like to change it to 10 or 14 :)

Posted: Fri Dec 20, 2013 6:18 am
by Rado1
jonaspm wrote:I would like to change it to 10 or 14 :)
Sure jonaspm, you can do it in generated AndroidManifest.xml; <uses-sdk android:minSdkVersion="8" />. Just use another number and recompile ZGE application. However, it makes no sense if you generate only from ZGE. This version is a minimal version of Android API to support. Because ZGE generates for android-8, it works also for all higher versions. The difference would be if you used some external libraries which require higher API level.

Posted: Fri Dec 20, 2013 7:22 am
by jonaspm
Thank you Rado1! I necessarily need Android SDK tools API 8 installed right?

Even changing
<uses-sdk android:minSdkVersion="8" />
To
<uses-sdk android:minSdkVersion="10" />

Still didn't let me compile.

Posted: Fri Dec 20, 2013 9:01 am
by airpas
thanks Rado1 you're right .

Posted: Fri Dec 20, 2013 9:19 am
by Rado1
jonaspm wrote:I necessarily need Android SDK tools API 8 installed right?
Not SDK tools, but SDK Platdorm for Android 2.2. ZGE compiles binaries against this version of API to be compatible with most (even obsolete) devices. Right, you need to have this installed.

Posted: Fri Dec 20, 2013 6:26 pm
by jonaspm
Installed API 8 and now it works, thank you! :D

Posted: Fri Dec 20, 2013 6:46 pm
by Rado1
Glad to help you.