Hi All,
Maybe someone has an answer to this. I’m tracking CPU time and I can see it take between 1 to 18ms without any code in the scene. It’s just a static cube and a camera. No Guilayer, flare layer, audio listener… nothing extra. Just a cube without any other extra code and nothing changing in the scene at runtime… I’m building 3.2 release for iOs4.
I’m trying to get a game going at 60fps but with fluctuations like that without anything going on… I wonder if it is possible.
iPhone Unity internal profiler stats:
cpu-player> min: 1.0 max: 17.7 avg: 9.1
cpu-ogles-drv> min: 0.1 max: 0.3 avg: 0.1
cpu-present> min: 0.3 max: 1.5 avg: 0.5
frametime> min: 15.2 max: 19.9 avg: 16.9
draw-call #> min: 1 max: 1 avg: 1 | batched: 0
tris #> min: 32 max: 32 avg: 32 | batched: 0
verts #> min: 24 max: 24 avg: 24 | batched: 0
player-detail> physx: 0.2 animation: 0.0 culling 0.1 skinning: 0.0 batching: 0.0 render: 8.3 fixed-update-count: 0 … 1
mono-scripts> update: 0.0 fixedUpdate: 0.0 coroutines: 0.0
mono-memory> used heap: 131072 allocated heap: 131072 max number of collections: 0 collection total duration: 0.0
by default the iphone app will refresh 30 times a second, thats specified like this in the xcode sided defines. so if you want it to go at 60 you have to change it there.
just be aware that you really need to have such a trivial scene to keep 60 fps as the screen is vertical sync enforced
Is CPU time equal to frame time? I thought they were different. I have modified appcontroler.mm to 60fps by the way.
My concern here is that without anything running, I get huge CPU fluctuations. 1ms to 17ms for no apparent reasons is kind of weird…
You can read my story (drama) here: http://forum.unity3d.com/viewtopic.php?t=34231
and here: http://forum.unity3d.com/viewtopic.php?t=35372
In short:
I tried every optimization/setting I could imagine. Unity is not capable of delivering steady 60fps performance on a 3G device (even for the simplest scene). At least I didn’t found how to do it and nobody proposed something I had not tried already.
Unity is very fps-sensitive and this gets very visible on 60fps and physics-based games.
I ended up going with Cocos2d for such things (still studying obj-c)…
Hello!
I did read your thread before… Not encouraging. What’s really strange is that there are no answers from Unity staff… They know and can’t solve it? Or they don’t care…
I’m able to display A LOT and still be very close to 60fps BUT it is not consistent and I do get the stuttering for no known reasons…
(notice that there are 2 threads in my previous answer)
From my experience, it seems that any game that implements constant movement of an object (with transforms, animation or physics) is going to uncover the “stutters effect” in Unity. It depends on the style of the game whether the effect will be annoying or acceptable/unnoticeable.
For example, in Zombieville it is acceptable (on iPhone 3g) but it gets noticeable in Captain Ludwig, despite having less intensive graphics (it has more constant movement/rotation of the objects and the stutters get easily noticeable).
I believe that Unity team can’t do anything for this as it seems to be the payoff of using Mono.
I really wish there was something I am doing wrong on my side…