Hi, I am making a game which is lagging during 2 scenes on Ipad 4, but when i run it on Iphone 5S it is perfect. I think i tried everything to make it run smoothly on ipad but nothing seemed to work.... Any tips ?
Hi @hegedusv I have compiled this list in the other day Before any optimization make a copy of your project (backup, just in case...) If you can reduce or remove light effects -- those are cool but CPU hogs! If you use scale to reduce size (or increase), then resize the sprite images and use 1.000, 1.000 instead -- this part can take a lot of time if you used it heavily throughout your game If you use any Hue, Brightness etc modificators on your sprites, better to modify the graphics and reimport the images so no effects are applied Try to reduce number of objects Manually: If you have complex structures built up by multiple objects you might need to combine them to bigger block. My upcoming game has "bricks" and figured out if I combine bricks to 2,3,4,5 of them as separate objects I could reduce the number of objects greatly which helped on the perfomance Automatically: Tools -> Convert to Clones -- That can help too, maybe better to try this first... Do the usual image optimizations Tools -> Remove Unused Image Objects View -> Atlases -> Optimize, Optimize Atlases Make sure you have no more than couple of Atlases. I have 2, maybe I will have 3 by the time finishing this game. If you have more than 8 after Atlas optimization, probably you need to re-think if you need that much
Thank you! I think i tried all of this methods before none of them worked. And the thing is that the lag comes in only in one part of the scene, where there shouldnt be any problem as i checked it 100x times...
Sorry to hear that. Have you tried to re-create the scene? How many objects do you have in there? It is quite hard to tell anything without seeing what is in there
I havent tried it yet, maybe i will recreate it. Its almost the same amount of objects as the other scenes. I cant show it now i am not at home. Maybe a recreation should fix it...
Nah, i test stuff on iPad 2 and if there are no crazy light effects there it works smoothly. And if there are crazy light effects BB automatically switch those off (runtime, so on slow iPad game is still playable, maybe with less juicy effects)
I just reread your tips, and i came upon the convert to clones solution. I havent tried it before, but will try today, as the maps in the game are made of small objects. I hope it will help!
I have an object which is functioning as a fixed object, but on some scenes it is functioning as a physics object. If i enable convert to clones, will it change the objects role?
Convert to Clones should only affect objects with all the same properties, except for size, position, scale and opacity. So in other words no, it will not affect the objects role. As noted by @trudnai always make a backup though as this process is not reversible.