A question about spawning actors
Hyrytty
Member Posts: 39
If I spawn a total of 100 actors in my game (I have 100 different enemies for example) and keep recycling these. Will I have a bad performance? What is the limit of spawning actors before it gets slow?
Edit: There wont be 100 actors in the game at the same time. It will spawn 1-2 maybe of each actor randomly then keep recycling these ones. Every 0.5 second it will spawn 1/100 actor, so say maximum 15 actors on the screen at the same time.
Edit: There wont be 100 actors in the game at the same time. It will spawn 1-2 maybe of each actor randomly then keep recycling these ones. Every 0.5 second it will spawn 1/100 actor, so say maximum 15 actors on the screen at the same time.
Comments
For example, my app has 10 types of actors(each has more than 30 rules), when they were all on screen and under attack by different enemies, the fps will drop to 45 even 35 because more than 150 rules be triggered at the same time
Also, if the game only has some simple actors like bullets, even you are not using recycle, the performance will still good
Do you think the performance will be good?
the performance will be based on many things but if you have it setup to spawn now you might as well play it on the viewer and see what it looks like and build an adhoc and test on a bunch of devices and see. You may like how you have it now and that crashes only iphone 3g and 2nd gen touch. so then you can decide if you want rework it or just limit it to newer devices by requiring ARMv7.
There is so many things that could affect performance ultimately you will have to try your ideas to see if the combination you have will work ok.