Slow performances

When I tried my app on my iPod it was very very slow. It’s a simple app. There’s about 12 low poly objects. I have a total of 13039 vertices in the scene. One directional light. There’s one texture (256x256 jpeg) and 7 short sounds (aiff). Nothing fancy on the shader side. There’s only 2 scripts. One is to set the iPhone horizonatally and the other one simply raycast to “select” an object. If an object is hit it will play a sound and do a 6 frames animation. It’s like this for 7 different objects. Performance setup is set to superfast.

Of course on the computer it’s super fast but on the iPod it’s super low, it lags a log.

I have the Indy version so I can’t optimize too much but if someone could give me some ideas on how I can fix that problem that would be nice because right now my game is unusable.

Thanks,

Robert

Taking the directional light out should yield a big improvement. Any way you can deal with the light gone?

The iPhone Basic version can be optimized about as much as Advanced as far as speed goes; it’s only build size that you can’t reduce, but that doesn’t really affect speed.

Anyway, try without the light; lighting slows things down. But I think the main problem is the 7 objects that are skinned and animated. Try a test with 7 static, non-animated objects and see what the difference is. Basically you can’t expect much out of the iPhone as far as animated characters go: reduce bones to just a few, set the bone weight to 1, use the absolute bare minimum polygons.

–Eric

Wow! You guys are right, taking the light out made a big improvement. Still not fast enough though.It looks like it’s trying to finish either (or both) the animation or the sound before it executes the next one.

@Eric, I only have one character with bones, the other objects are animated just with rotations.

I will try to reduce the poly count.

Thanks!

Robert

PS: I still need some kind of light in my scene. What’s the most efficient? Spot or point? Or maybe I can simulate an ambient light with the shaders?

Directional lights are the most efficient, followed by point, and then spot. You can try baking lighting using vertex colors.

–Eric

force the light to vertex especially. otherwise it will go into pixel alike mode and double the geometry amount.

other than that: If you have a 1st generation ipod touch, target for 7000 polygons.
Do not use polygon collision but combinations of the basic colliders

At 13k+, you will have a hard time get fluid refresh rates, on a 1st generation ipod, chances actually go towards 0 as it is only half as fast as an ipod touch 2nd generation.