Solid 60 FPS with 2d game?

Hey guys,

I’m really frustrated to get my game working smoothly.
I tried anything to optimize it.
The even worse thing is, that I’m working with an iPhone 4, which will make it an even harder task to optimize it on older devices.

But first things first.

I’m working on a 2D game.
I have a 3d Sphere as my game object, and dozens of obstacles. These obstacles are 2d Textures, which are attached to custom planes (Planes with only 2 tris). My Background is 640*1920 and repeats itself.

There are only a handful of different obstacles (3-5).

If I’m running the game, i get about 10 Drawcalls and up to 30 batched ones.

I set the FPS limit to 60, since its really sluggish with 30.

The game runs mostly ok, but sometimes I get hickups, where for a milisecond the game lags, and precisely these lags I want to trash.

What should I do? Is it maybe the texture size, since I’m working with Retina optimized ones. Or are the batched draw calls the culprits? (since I’m not higher than 10 separate draw calls).

I know that Unity is a bit weak on the 2d side, but I heard that its mostly because of the draw calls.

Heres a sketch, maybe it helps to illustrate it a bit better. ImageShack - Best place for all of your image hosting and image sharing needs

I appreciate any help.

Thank you.

Are you perhaps instantiating and destroying objects on the fly at all?

no, I design the levels with the obstacles. At runtime there is no instantiating or destroying.

Are you using OpenGL ES 2.0? If you don’t need to, definitely use 1.1 instead.

The Target Platform is armv6 (OpenGL ES1.1)

Is there really no one with similiar problems?

I really dont know, where else to turn to.
I pretty much have no idea where the problem lies, since there are dozens of 2d Unity projects, which work with rock solid framerates.

Maybe if you tried to contact one of the devs that made one of those games you could get some tips from them on what they did to boost performance.

Use Sprite Manager 2 for 2D games so u can use less materials for sprites…less materials, better performance…

Is the 3D sphere a standard one from Unity? If so, it will be very high poly.