Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

fps performance

Discussion in 'iOS and tvOS' started by binsint, Mar 13, 2012.

  1. binsint

    binsint

    Joined:
    Jul 16, 2011
    Posts:
    83
    hi, im having trouble with the smoothness of my game.i build my game into my 4th gen ipod and it becomes choppy and NOT SMOOTH enough. what am i missing? what are preffered player settings? i have 9 drawcalls and 2,400 triangles. do you change something in the xcode project? im using Unity basic NOT unity PRO. any advice? thanks
     
  2. laserlars

    laserlars

    Joined:
    Nov 17, 2011
    Posts:
    255
    What version of Unity do you use ? If you have an older version than 3.5 - check the AppController.mm in Xcode - kFPS is set to 30 by default, and will cause your app to run at 30fps. Try changing it to 60.
     
  3. binsint

    binsint

    Joined:
    Jul 16, 2011
    Posts:
    83
    thans laserlars.

    im currently at unity 3.4.2 ... ive tried changing the kFPS to 60 and yes it was helpful. but some of my scenes are not smooth enough with 9 drawcalls and 2,400 triangles... is it because that im not using unity PRO? because there is no static batching. thanks
     
  4. laserlars

    laserlars

    Joined:
    Nov 17, 2011
    Posts:
    255
    It could be alot of things. I'm also fairly new to Unity, but I know there's alot more to it than just drawcalls and triangles that has an effect on performance. What shaders are you using?

    My game has about 20-30 drawcalls and alot more than 2400tri, and still runs pretty smooth on the iPhone4 - So I don't think that's the issue here.
    Maybe someone else can come with a better answer :)
     
  5. binsint

    binsint

    Joined:
    Jul 16, 2011
    Posts:
    83
    thanks.im using unlit/ texture shader since i will be using 3d models with a painted texture from blender. do you think scripting can cause this performance issue too? i have more than 5 invokerepeatings running at the same time. i really need to tweak the performance of my game. anyway thanks laserlars i reall appreciate it.
     
  6. Detocroix

    Detocroix

    Joined:
    Jul 2, 2010
    Posts:
    75
    Do you use rigidbodies with physics? PhysX is VERY heavy for ios. Also if you're destroying objects you'll get some serious impact on the device.
     
  7. binsint

    binsint

    Joined:
    Jul 16, 2011
    Posts:
    83
    i only have 1 rigidbody. i use it on my main character but i have more INVISIBLE box colliders. and i noticed as my game runs the FPS is lowering down... it lowered from 30 to 12... what seems to be the problem? and is it ok i have more invokerepeatings? and yes i destroy objects too.
     
  8. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    Rigidbody , if you use them carefully and take care about the collider type you are using , are not that big issue on iOS ..specially on 3gs+ device..

    choppiness can become from multiple cause, with combined get you in trouble, ,your scene seem to be not that heavy in term of shader physics and so on , so maybe something in code that you did not spot that would cause this, I don't think for the lower fps delta you get , some change of kFPS in Xcode ( if your fps degrade at 30 it will at 60 and no matter what steady fps is always better than jump form 60 to 40 all the time..) or whatever would resolve your issue, unless you are victim of a bad Unity bug
     
    Last edited: Mar 13, 2012
  9. binsint

    binsint

    Joined:
    Jul 16, 2011
    Posts:
    83
    thanks giyomo. i think its in my code( i just dont know where) because after every end of round the fps jumps to 53 - 59 again. the fps at the start of the game is 29 - 35.
     
  10. xtr33me

    xtr33me

    Joined:
    Nov 2, 2011
    Posts:
    90
    Just going to step in here. I recently have been getting into the perf tuning side of things on my game and on the IOS and I cant stress enough to not use iTween for anything in-game. If you are using it in menus and stuff its all fine. ITween is awesome for simplifying various actions and it worked perfectly on the PC, but it was a dog on the IOS devices. In the profiler it was always at the top of the list and when I just wrote the code myself, the performance increase was night and day. This is my first game, so I am learning along the way and just wanted to make sure you dont overlook that if you are using it. When I got iTween I was using it for many of the transitions and text effects in game just because I could and it was of course easier then writing it myself. However when I saw how much it was hurting the performance, I wrote it myself and now those objects aren't anywhere near the top. Just some info :)
     
  11. binsint

    binsint

    Joined:
    Jul 16, 2011
    Posts:
    83
    thanks xtr33me. i use i tween on my level selector and it runs on 59.1 to 60 fps and seems VERY SMOOTH. but the actual game is choppy and i dont know why.i dont use itween on the actual game.. i used 3dTexts as my GUI and made it children to the camera so they dont get left behind by the camera.
     
  12. binsint

    binsint

    Joined:
    Jul 16, 2011
    Posts:
    83
    I finally found whats wrong... i used mesh colliders on my environment... i should've used box colliders... now its running 59.2 fps. :) :)