So I am new to iPhone dev and am having some problems getting my game to run well.
I built what I thought was a simple scene (Beast baked light maps, no realtime lights, capsule for main character in a fairly simple scene I made in blender) and when I built it in xCode the framerate on iPhone was unplayable.
What are the biggest FPS killers in iPhone dev? What are some good rules of thumb for art assets (polycounts/textures etc.)?
EDIT:
-Are raycasts expensive on the iPhone?
-Is it faster to use a text mesh or an OnGUI label on iOS?
blob shadows aren’t bad due to the transparency itself. They are bad because each object hit by them will render its mesh with the “blob material” again basically.
It is actually, you have a 960x640 display which the GPU can barely handle, so having too much transparency/overdraw tends to slow things down noticeably. You can drop that to 480x320 and then there’s no problem, but then of course you have a low-res display.
Is this typical of released games? Or is having a game that doesn’t use the max resolution a taboo?
Also, what is the max recommended texture size for iPhone 4? I am making an atlas texture so a bunch of objects can share materials, how big can my texture atlas be? 1024? 2048?
P.S. What is the purpose of the new “background” shader that came in 3.2
hey you can use openGL 2.0 without problem ( or at least not much ) if you optimize your shader correctly…I everytime wonder with these opti question cause you mostly may test out things for yourself on your particular project …fro some of project i am on , we use particle stuff , gl 2.0 , GUItexture etc , we pass over the politically correct limit of the 30 draw call and so on…
ok we don’t target 60fps and we are not on 4g retina , that help …All that really matter is what your app is doing and do some stress test , check the profiler to spot where things get bad etc …
Okay yeah so my problem was definitely the blob shadows. I had 5 capsule characters all standing on the same mesh each with a blob shadow. Now that they are gone there is no problem
My game is a platformer though, so down facing shadows are really helpful for judging height of the character. What are some good alternatives to blob shadows?
goto Edit-> Time Settings and decrease max allowed timestep to : 0.1 if your game does not depend on great physics features timesteps can enforce your render speed.
make sure you don’t use to many draw calls , I reduce draw calls from 300 to 40 just mixing up with materials and lightmaps
use some reasonable verts count : 10 K - 15 K for iPhone 4 or iPad or less then 8K for iPhone 3G or simmilar devices
use smaller smaller quality for standalone
use garbage collections on start of your scene
mixup with layer matrix’s in Physx Editor , see which layers don’t interact and uncheck them
optimize your scripts, don’t use lot’s of scripts with lot’s of Updates functions or FixedUpdate or similar functions , use as little as possible number of scripts .