How to make game lighter , so that it can run fast?

Hello all …

I made a game for iphone 3GS…

but i am facing many problems when i run it on simulator because it run very slow and its build size is also large…

i also decrease the size of textures , use box collider instead of mesh collider where is it possible, also decrease the size of object …

but this does’nt solve my problem… give me some direction to improve this …

Thanks

iPhone means Pro. So use the Profiler to have a look where your resources are going.

Have a look at your code. And clean it up. Code in Update like gameObject.find should be replaced by something more resource friendly.

Then have a look at your drawcalls. With forward rendering every light makes one drawcall per mesh. So you better dont use too much lights. Union geometry with the same material to one mesh. And remove double vertices. Remove every hidden face/geometry. This decreases the size of the lightmaps. While at it, single lightmaps needs just half of the images than dual lightmaps. In case you work with Projector shadows, use ignore layer to stop it rendering at not needed geometry. This is especially important for the unioned meshes, because the projector shadow will call a draw when its within the bounding box of such a unioned mesh.

There are surely much more points. But that`s the ones that jumps into my mind here.

No it doesn’t. There’s still iOS Basic.

It’s pretty much impossible to say what’s weighing the game down, but Tiles has many good points. Also, why are you running the game in simulator? It doesn’t reflect the actual framerate, you should be testing it on the device to see how it actually runs.

In addition to above, one potential culprit is OnGUI.

ok …

i have done with all but problem doesn’t solve …

i also run it on device… i also work on gameobject.find … but problem remains

Okay, no pro. Then turn off VSync. This will run your game in maximum speed. Now disable you items, one by one. Until you found your ressource monster. Once you found it you can rethink your strategy, means level design or code reduction.

Edit: Texture atlas is also one point that could save a few draw calls. But beware of the texture size limit.

i want to decrease my build size small because i am using single scene in my game and having a very few game objects but its size gets more than 170mb
howcan i reduce it ???

sorry …

i want to decrease my build size small because i am using single scene in my game and having a very few game objects but its size gets more than 170mb
howcan i reduce it ???

how can i reduce rendering of object ???

Did you even read the advices?

yes i read and implement all the advice but the problem can’t solve

Hard to believe, those advices should have kept you busy for minimum several days. You should at least be able to find your baddie that makes your game so big by deleting the objects one by one.

Anyways, i run out of ideas, sorry. I gave all advice i have.