Hello,
Too slow for android 4.0.x (ice cream sandwich) and 4.1
Test)
same code, same hardware spec, 2 devices
game’s fps is good for android 2.3.6
but, android 4.0.x or 4.1 is too slow sometimes(schedule and animate is canceled sometimes)
I think this issue is not depends on device,
maybe depends on android OS or cocos2d-x
A port of alpha version of my iOS game has strong 60 fps on HTC Wildfire S with Android 2.3.5, while on GALAXY SIII with Android 4.0 - only 40 fps. I’m not sure if this can affect performance, but when creating android project I set the target to Android 4.0. Currently the game is not heavy on graphics, so most likely it will drop to unacceptable 20-25 fps with more sprites/effects on screen.
+1 for that issue
>
A port of alpha version of my iOS game has strong 60 fps on HTC Wildfire S with Android 2.3.5, while on GALAXY SIII with Android 4.0 - only 40 fps. I’m not sure if this can affect performance, but when creating android project I set the target to Android 4.0. Currently the game is not heavy on graphics, so most likely it will drop to unacceptable 20-25 fps with more sprites/effects on screen.
>
Any ideas/fixes?
in my case,
add option “APP_ABI := armeabi armeabi-v7a” to Application.mk, and build_native~
You can see increase framerate, but It is just little more,
A port of alpha version of my iOS game has strong 60 fps on HTC Wildfire S with Android 2.3.5, while on GALAXY SIII with Android 4.0 - only 40 fps. I’m not sure if this can affect performance, but when creating android project I set the target to Android 4.0. Currently the game is not heavy on graphics, so most likely it will drop to unacceptable 20-25 fps with more sprites/effects on screen.
I have ported my game Arrow Mania to an S3, running Android 4.0.4 at the moment, using “cocos2d-2.0-x-2.0.2 @Aug.30 2012”. It has no problems running at 60fps and there is quite a lot on screen. See my video https://www.youtube.com/watch?v=f4oDq-wLUsw
One thing maybe to note, turn off “power saving” mode on the phone.
Minggo Zhang wrote:
> Do you have any clue?
>
You can test “Zwoptext Tests”
>
You can see http://youtu.be/4oowC9fA-bk
First phone is galaxyS1(2.3.6)
it’s smooth when right button touched
Second phone is galaxyS2HD(4.0.3)
it’s drop framerate when right button touched. Look at the framerate.
>
I think file I/O performance or security issue between cocos2d-x and android OS 4.0.x or above.
I found something,
Same code, Same files, test 2 devices
GalaxyS1 (2.3.6)
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile(“zwoptex/grossini.plist”);
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile(“zwoptex/grossini-generic.plist”);
elapsed time : 0.076
GalaxyS2HD (4.0.3)
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile(“zwoptex/grossini.plist”);
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile(“zwoptex/grossini-generic.plist”);
elapsed time : 0.180
GavT GMTDev, I’m using the latest stable version, maybe the problem is here.
>
Btw, what target did you set for your app? did you make any changes to android.mk?
Oh right my mistake, I can confirm there is a problem. If I set the project build target in Eclipse to Android 4.0.3 the frame rate drops to 54fps, Android 2.2 and its >60fps. And I didn’t recompile the code in terminal, just build (link) and run in Eclipse.
Oren Bengigi wrote:
> No,
> You need to disable it in the manifest.
>
> See here how to do it:
> http://developer.android.com/guide/topics/graphics/hardware-accel.html
>
> Let us know if that works.
>
Yeah that is it. I added “android:hardwareAccelerated=”true" in my manifest and with target set to 4.0.4 the game is back to 60fps+.
>
e.g.
>
[…]
It is not works for my case.
(I set android:hardwareAccelerated=true, and target set to 4.1.2, and run… Same result)
freezing fps when read plist file on android 4.0.4 or above
2.3.6 : 7~8.8 fps
4.0.4: 2.4~2.7 fps
I test samples which Zwoptex tests in cocos2d-x
and I test some more for cocos2d-x 1.0.1, 0.12.0
2.3.6: 29~38 fps
4.0.4: 22~35 fps
It is little difference cocos2d-x 2.0.2
What diff cocos2d-x 1.0.1 and 2.0.2 about read plist?