Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

We are building a tower defence game,In which enemy movement is done through sprite sheets as well the tower rotation is also done through sprites...every tower and every enemy has its own script attached to it which controle its animation...but when enemies and towers are in greater ammount the games slows down..and become laggy on iphone and unity ..can anyone tell what is the problem with it...

share|improve this question
2  
Do you have Unity Pro? Have you tried using the profiler? –  Tetrad Mar 2 '12 at 16:30
    
It is hard to see the performance problem without seeing the scripts. Maybe you could provide us with a pasebin link to your script? –  jonas Apr 13 '12 at 11:26
add comment

1 Answer

In a personal project of mine having a script working on every object in the game would slow the game down drastically. Thus creating a main object that controls multiple things should give a performance increase

share|improve this answer
    
Welcome to GDSE Roy! We typically like our answers to be a bit more in-depth. Perhaps if you could link to references or explain the reason for the slow down further that would make this answer better. Thanks for your contribution. –  Byte56 May 28 '12 at 15:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.