Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Best Practices for an FPS?

Discussion in 'Works In Progress - Archive' started by SevenBits, May 20, 2012.

  1. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Moderators, please move if necessary.

    I am currently developing a rather large FPS (slightly out-of-date topic), and am almost ready for a third alpha. I have, however, hit a small coding problem on one of my newer levels with FPS. Simply put, it's a large terrain which uses the ATS package and other effects, as well as some small buildings. Unfortunately, my FPS always dips when I look out towards the majority of the level, and then becomes stable again when I look away.

    This drop is not too severe, but enough so to make me nervous. I'm tried everything, from changing the tree bill boarding distance to tweaking the fog settings, but no avail. Does anyone have any idea of something I can do to keep a stable FPS?
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    8,165
    What kind of dip?
     
  3. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Goes down by a few points, average of 50 or 60. And I have a fairly powerful machine, so I don't want someone who doesn't have as good of a machine as I to see a performance decrease that is significant. Especically since the mission requires you to walk through an area that is somewhat heavy in detailed assets.
     
    Last edited: May 20, 2012
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    8,165
    I mean, was the previous 600fps and then it goes to 594? Because then it's not significant.
     
  5. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    No, more like 150 to 100 or 90. Forget the zero in my original numbers, I'll go add those in quick...

    As I said, it is imperceptive that I fix this, because I can't have only people with my specs playing the game.
     
  6. UnlimitedEdition

    UnlimitedEdition

    Joined:
    Feb 27, 2012
    Posts:
    287
    I know it's an FPS but...
    Is ambient occlusion out of the question?
     
  7. Paradigm-SW

    Paradigm-SW

    Joined:
    Dec 23, 2011
    Posts:
    402
    This ^
     
  8. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,664
    You mean occlusion culling
     
  9. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,064
    before everyone is confused,
    occlusion culling = not showing objects that are in front of you but behind walls n stuff



    ambient occlusion= a way of lighting a model/level that is usually done in a 3d modeling package and baked into the texture/lightmap (notice the small shadows that help show off the the model and make it seem more detailed)
     
  10. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    662
    If only we lived in a world where all frames per second stayed constant all the time...

    The fog settings really only control when a texture is being rendered, I believe the object and it's quads are still being rendered no matter the fog setting. What might help is adjusting the camera far distance clipping option, which actually clips the quads according to distance. Or better yet, make an option for the clipping distance so depending on the computer speed, you can change the distance to best suit your computer.
     
  11. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Yeah, that seems like a viable option in outdoor terrain levels with fog. However, what about indoor levels, ie passageways or corridors and outdoor areas where fog isn't viable based on the level and scene. Then parts of the world would just disappear, kinda killing the effect.

    I'm aware of occlusion culling, but M2H fails for me and I don't have $1500 to I can spend on this. So I'm caught in a tight-ish bind here.
     
unityunity