Towards iOS 60fps (Game Experiment Update #9)

The last build did not translate very well to iOS running at around 12fps. It was immediately obvious that the main issue was the dynamic lights.

Firing up the unity profiler I could see straightaway that the number of draw calls being made was huge. Up to this point Id just been using default materials and primitives from Unity with no real thought for performance, the idea was after all to test a gameplay idea. The issue, then is that I really want to use touch, and touch at 12fps works but is not really acceptable.

Firstly, i ripped out all the current materials, and moved to mobile specific shaders.

Secondly the maze is dynamically generated (although it does not change right now, its an important feature). Each block of the maze walls is just a unity cube primitive, however these dont need to be independently moved once placed, so running the unity combineChildren helper scripts spits out a nice single mesh for all these objects.

Finally I disabled all point lights in the scene.

Immediately the draw calls fell to 6 which is the number of unique materials used – meaning the dy

namic batching of geometry was working at its optimum factor.

 

Uploading this to an ipad3 the profiler is now showing a 100fps render speed (theoretically only as IOS is limited to 60fps). Sure things look dog ugly right now, but 100fps is a much better place to start from than 12!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

802 Spam Comments Blocked so far by Spam Free Wordpress

HTML tags are not allowed.