playMaker

Author Topic: Advice on improving FPS  (Read 5050 times)

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
Advice on improving FPS
« on: July 26, 2013, 12:43:44 AM »
Hi

I am getting on well with my game, I have finished level 1 but I am looking to try and improve the FPS.

Currently on a iPhone 4 its running at 15 Max, as I am targeting 3GS id like to improve on this.

I have a few tests to do to see what the main problem is, one of the things I think it could be is the amount of colliders I have in the level, for instance on my enemies I have 3 cube colliders.

I was wondering if I could get some recommendations to improve on this.

Ill explain below on what has colliders and what they do;

Blue Gem

The player is able to collect blue gems, each gem has 1 collider which when the player hits it - triggers the event to increase gem count and despawn the gem.

I have tried changing this around so the player has the collider attached to them  but cannot seem to get that to work

Monsters

Each monster has 3 colliders on them.

1) One collider which is not triggered, this gives the monster physics etc so that it can walk on the ground (without it, it falls through the ground)

2) The next collider is set so if the player hits it, it hurts the player

3) The final collider is a small square on the top of the monster so if the player jumps on this bit - the monster dies.

I know this is not giving much information away

escpodgames

  • Hero Member
  • *****
  • Posts: 673
    • View Profile
    • Assets
Re: Advice on improving FPS
« Reply #1 on: July 27, 2013, 01:04:53 AM »
What about poly counts? other aspects that will have a greater impact on fps.

Also, why are you targeting 3GS? Personally I have dropped this device as it's old and based on Unity figures, 2.4% of Unity games are run on a iPhone 3GS. Also iPad 1: 2.0%, is that few percent worth targeting? and if you do will it impact the look or feel?.
 
« Last Edit: July 27, 2013, 02:21:43 AM by LampRabbit »

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
Re: Advice on improving FPS
« Reply #2 on: July 27, 2013, 05:23:13 AM »
Hi

There is no more than 11k verts at any one time in the camera view. Not sure about the entire scene.

I am looking to get Pro at some point so hopefully this is advise me on where my main issues are.

Didnt know that about 3GS, I am testing on iPhone4 at the moment so might focus on that.

Thanks

escpodgames

  • Hero Member
  • *****
  • Posts: 673
    • View Profile
    • Assets
Re: Advice on improving FPS
« Reply #3 on: July 27, 2013, 05:55:28 AM »
One thing to look at is the fps is limited in xcode and you have to increase it, think it was 30 fps (might not be the issue for you but worth a check)

If I were you id get a scene with no code running on device (just the assets) and check that against the scene with code running, just so you can narrow down where the issue is.

Does Unity free show draw calls? take a look at how many draw calls you are creating. I'd say your characters/gems are possibly creating too many. Also pro has dynamic batching so it would batch your characters/gems ... from what I understand. Also materials, how many do you have? can you reduce that, reuse materials where you can, combine textures etc.

Alpha! This is a big one, if you're using a lot of alpha (takes up a lot of the screen space) it will kill the fps on ios.
« Last Edit: July 27, 2013, 05:57:57 AM by LampRabbit »

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
Re: Advice on improving FPS
« Reply #4 on: July 27, 2013, 06:22:16 AM »
Thanks

I currently have static batching going and thats saving me a lot of draw calls - I hit no more than 25 draw calls in the camera view at any time.

Currently using around 4-5 materials per level, which Ill hopefully reduce once I start combining them.

I do believe that Dynamic batching will do a better job - another reason why I will need to get pro soon :)

Thanks again - Ill keep testing but will probably look deeper once I have pro :)

escpodgames

  • Hero Member
  • *****
  • Posts: 673
    • View Profile
    • Assets
Re: Advice on improving FPS
« Reply #5 on: July 27, 2013, 06:35:09 AM »
25 is fine, something else fishy must be going on :S

escpodgames

  • Hero Member
  • *****
  • Posts: 673
    • View Profile
    • Assets
Re: Advice on improving FPS
« Reply #6 on: July 28, 2013, 04:46:25 AM »
Keep us updated, I'm keen to see what is slowing it down.

guisquil

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advice on improving FPS
« Reply #7 on: July 28, 2013, 06:24:37 PM »
Is this 15 of 60FPS?

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
Re: Advice on improving FPS
« Reply #8 on: July 29, 2013, 12:58:43 AM »
Ill keep you updated :)

15 fps of 60?

Ill be doing some more tests soon ie reducing amount of polys on screen etc - I do think once I get pro ill be able to get more info and look at improvements

It could be down to how I have set up my FSM's but I wouldnt have thought that would cause FPS to drop so much :)

guisquil

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile

guisquil

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: Advice on improving FPS
« Reply #11 on: July 30, 2013, 10:54:03 AM »
I don't have pro so this one is cool too:

"Measuring Performance with the Built-in Profiler"

https://docs.unity3d.com/Documentation/Manual/iphone-InternalProfiler.html


lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
Re: Advice on improving FPS
« Reply #12 on: August 02, 2013, 07:06:51 AM »
I have activated my 30 day pro trial so I could take a look into the profiler, I am not sure if this is much information to go by...


lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
Re: Advice on improving FPS
« Reply #13 on: August 04, 2013, 01:08:21 AM »
Little update

I have managed to boost my FPS on my laptop by an extra 100. I did this by not rotating my collect able items...

escpodgames

  • Hero Member
  • *****
  • Posts: 673
    • View Profile
    • Assets
Re: Advice on improving FPS
« Reply #14 on: August 04, 2013, 02:46:23 AM »
Did you also set them to static? Otherwise that sounds weird...