Playmaker Forum
PlayMaker Help & Tips => iOS Help => Topic started by: lioncirth on July 26, 2013, 03: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
-
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?.
-
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
-
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.
-
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 :)
-
25 is fine, something else fishy must be going on :S
-
Keep us updated, I'm keen to see what is slowing it down.
-
Is this 15 of 60FPS?
-
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 :)
-
http://docs.unity3d.com/Documentation/ScriptReference/Application-targetFrameRate.html
I do it with a script but i found this action:
http://hutonggames.com/playmakerforum/index.php?topic=2424.0
-
Thanks alot!
Will add it and see how it goes :)
http://docs.unity3d.com/Documentation/ScriptReference/Application-targetFrameRate.html
I do it with a script but i found this action:
http://hutonggames.com/playmakerforum/index.php?topic=2424.0
-
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
-
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...
(http://solus.zidasstudios.com/wp-content/uploads/2013/08/SolusProfiler.png)
-
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...
-
Did you also set them to static? Otherwise that sounds weird...
-
Nope not set as static
I think it is because they all had a collider on but no rigid body - resulting in more work when they moved.
I didnt want that many rigidbodies so removed the rotation on them.
With the trial of pro and dynamic batching I have managed to get fps up to 28-30 so thats perfect :)
-
It's just a shame about the price tag ... though I've shelled out for it twice now .. but it's worth it :D
-
Yeah but from the 1 day of using Pro I can see that it is well worth it.
Id have it for the black theme :P
Better get saving up now hehe