I think we should together in the community create a big checklist of things to think of, especially regarding performance, when it comes to 2D games for the iPhone done with Unity. If you write your tips here I could summarize them here. And once we get the list growing we should make this a sticky! What do you think?
The things that are currently on my list:
* Use an ortographic camera if you want everything to be completely flat. However using a camera with perspective will give you parallax for free just take a look at how you set things like your field of view.
* Never use the plane primitive that comes with unity if you want to display a simple sprite on a 3d surface. It consists hundreds of triangles, you should only use a quad with 2 triangles. You can create them with a 3D editor or this script: http://www.unifycommunity.com/wiki/i...le=CreatePlane
* Disable mip-maps for textures that never change in scale.
* Disable filtering for textures if that you want them to look more crisp and less blurry. This however requires that you use a good texture size and scale of the quad, mesh etc you apply the texture to.
* Use Per-Platform Overrides for textures so that they are scaled down for your iPhone build for example. Read more here: http://unity3d.com/support/documenta.../Textures.html
* Even if you are using flat meshes for graphics, give the physics colliders some z-depth to avoid problems with the physics simulations.
* For all rigidbodies, once you made sure that the colliders for the ground have enough depth, also make sure to contrain the rigidbodies so they don't fall out into 3d space. Select the rigidbody, click the contraints property in the inspector and set it to:
Position: Locked for z
Rotation: Locked for x,y
* For problems with the render ordering of things as the camera moves, take a look at Material.renderQueues.
* Use OpenGL 1.1 before 2.0 for more speed (Not true anymore? Difference?)
* Change the framerate to 60.0 fps in the AppDelegate if you want more fps. (default is 30.0)
* Use the Unlit shaders for the textures, do not use light sources. (Are there currently even more optimized shaders than the Unlit ones?)
* Take a look at Sprite Manager 2 and EZ Gui from AB Software, it might just suit your needs perfectly:http://www.anbsoft.com/middleware/
I will clean this list up and improve it as you guys give me more info, or if I find it myself . I'm not even sure all the things I have written are true, and some need more explanation.
http://forum.unity3d.com/threads/85974-2D-game-for-iPhone-checklist
The things that are currently on my list:
* Use an ortographic camera if you want everything to be completely flat. However using a camera with perspective will give you parallax for free just take a look at how you set things like your field of view.
* Never use the plane primitive that comes with unity if you want to display a simple sprite on a 3d surface. It consists hundreds of triangles, you should only use a quad with 2 triangles. You can create them with a 3D editor or this script: http://www.unifycommunity.com/wiki/i...le=CreatePlane
* Disable mip-maps for textures that never change in scale.
* Disable filtering for textures if that you want them to look more crisp and less blurry. This however requires that you use a good texture size and scale of the quad, mesh etc you apply the texture to.
* Use Per-Platform Overrides for textures so that they are scaled down for your iPhone build for example. Read more here: http://unity3d.com/support/documenta.../Textures.html
* Even if you are using flat meshes for graphics, give the physics colliders some z-depth to avoid problems with the physics simulations.
* For all rigidbodies, once you made sure that the colliders for the ground have enough depth, also make sure to contrain the rigidbodies so they don't fall out into 3d space. Select the rigidbody, click the contraints property in the inspector and set it to:
Position: Locked for z
Rotation: Locked for x,y
* For problems with the render ordering of things as the camera moves, take a look at Material.renderQueues.
* Use OpenGL 1.1 before 2.0 for more speed (Not true anymore? Difference?)
* Change the framerate to 60.0 fps in the AppDelegate if you want more fps. (default is 30.0)
* Use the Unlit shaders for the textures, do not use light sources. (Are there currently even more optimized shaders than the Unlit ones?)
* Take a look at Sprite Manager 2 and EZ Gui from AB Software, it might just suit your needs perfectly:http://www.anbsoft.com/middleware/
I will clean this list up and improve it as you guys give me more info, or if I find it myself . I'm not even sure all the things I have written are true, and some need more explanation.
Help me out!
//