SeharAfzal / cocos2d-android-1

Automatically exported from code.google.com/p/cocos2d-android-1
0 stars 0 forks source link

Performance #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, just try some demos with your cocos port and performance on emulator 
seems very crapy - simple black screen with label application get only 20 fps, 
and box2d demo starting lag with several boxes on screen. It's problem with 
emulator or with engine itself?

Original issue reported on code.google.com by megazoi...@gmail.com on 28 Oct 2010 at 6:43

GoogleCodeExporter commented 9 years ago
Might be your computer. I've talked to Google Employees about the emulator, and 
they said things often run slower on the emulator then on an actual device. 
This problem will be compounded if your computer isn't that great.

For reference, on my Powerhouse of a computer, I get 59 FPS with the label 
application. On my Nexus One, it's about 65 FPS on average.

Original comment by glen.nelson.1 on 29 Oct 2010 at 6:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I compared the demo vs andengine on my HTC Hero and I must say that andengine 
seems to outperform cocos2d. Simple animations stutter on my Hero with cocos2d 
and using andengine it's as good as I can expect on a Hero but no stuttering.

I would really like to see better performance so I can use cocos2d instead :)

Original comment by cla...@gmail.com on 1 Nov 2010 at 3:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I tried latest code on my HTC Hero again and the performance is quite good 
actually but it stutters sometimes. If I rememember correctly the Parallax test 
gives 30-40fps according to the numbers in the lower left corner and when it 
stutters it drops to below 10.

I haven't looked at the code to see why it stutters.

It's getting better :)

Original comment by cla...@gmail.com on 5 Nov 2010 at 2:58

GoogleCodeExporter commented 9 years ago
I assume this is the same codebase that was the cocos2d android project. In 
which case I have some gloomy news. I had decided to try and fix some of the 
bugs in the android port and got into the code. When I started to root around I 
realised that the whole thing had been written without thinking about the fact 
that you have to keep the memory  allocations up-front in android i.e. you 
can't just "new" an object when you feel like it. This seems to be a side 
effect of the conversion from the objective-c code. In short I believe you are 
doomed because trying to remove all the calls to "new" will be too difficult. 
The only approach that would have worked would be to build a port from the 
ground-up knowing that you had to keep the calls to "new" at a minimum and not 
perform any during animation loops etc

Original comment by alistair.rutherford on 10 Nov 2010 at 5:34

GoogleCodeExporter commented 9 years ago
I am noticing some occasional stuttering too, but not on the instantiation of 
the objects, which you would expect to happen if it was a case of newing 
objects 'overhead'. I wondered whether it is some kind of GC issue.

Original comment by docherty...@gmail.com on 24 Nov 2010 at 11:24