A question about spawning actors

HyryttyHyrytty Member Posts: 39
edited November -1 in Working with GS (Mac)
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.

Comments

  • xznkokxznkok Member Posts: 33
    This is depending on how complex of your actors (number of rules). The FPS is depending on how many rules be triggered at the same time.
    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
  • HyryttyHyrytty Member Posts: 39
    My first scene contains 1 actor spawning every 0.1 second for 6 seconds. So 60 actors in 6 seconds, then they keep recycling. Then next scene I've got about 30 actors. Every 0.5 second 1 actor is spawned and every actors has about 3-4 rules.

    Do you think the performance will be good?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Why not just put all 100 actors in the scene and recycle them from there.

    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.
  • xznkokxznkok Member Posts: 33
    NahirC said:
    My first scene contains 1 actor spawning every 0.1 second for 6 seconds. So 60 actors in 6 seconds, then they keep recycling. Then next scene I've got about 30 actors. Every 0.5 second 1 actor is spawned and every actors has about 3-4 rules.

    Do you think the performance will be good?

    Like I said, performance not depends on how many actors you spawned, but depends on how many rules you used in actors and how many rules are triggered at the same time
Sign In or Register to comment.