ZGEAndroid-debug is a bit slow

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
airpas
Posts: 48
Joined: Wed Apr 18, 2012 11:50 am

ZGEAndroid-debug is a bit slow

Post 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
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Post 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:
Attachments
zge.png
zge.png (38.82 KiB) Viewed 12252 times
Last edited by jonaspm on Sat Dec 21, 2013 9:13 pm, edited 1 time in total.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post 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.
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Post 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 :)
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post 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.
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Post 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.
airpas
Posts: 48
Joined: Wed Apr 18, 2012 11:50 am

Post by airpas »

thanks Rado1 you're right .
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post 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.
User avatar
jonaspm
Posts: 89
Joined: Fri Jul 06, 2012 3:51 pm
Contact:

Post by jonaspm »

Installed API 8 and now it works, thank you! :D
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Glad to help you.
Post Reply