One actor with a lot of rules, or, a lot of actors with little rules.

pokapolapokapola Member Posts: 143

Which one is better in terms of performance?

  1. Having one (or very little amount) actor, where all the rules to determine attributes/cellValues are cramped inside the actor, or
  2. Having many actors, with all the rules are divided among them, according to which attributes/cellValues that they are calculating.

Or there's no difference at all?

Comments

  • ArmellineArmelline Member, PRO Posts: 5,369

    The difference in performance is likely to be minor. GameSalad will be doing a lot of work "under the hood" to turn your rules into code that can run on iPhones etc., and although one method might reduce this work slightly in certain circumstances, it's only going to be noticeable in the very largest of projects.

    So it really will come down to which way you find easier to work with. I personally always go with one actor with lots of rules.

  • pokapolapokapola Member Posts: 143

    @Armelline Ahh okay. The reason why I ask is that I have a lot of actors (one to determine each Attributes/cellValues), and it seems that my game is using a lot of RAM, and the game suddenly would crash and auto exit. Do you think my actors are causing the performance problem?

  • ArmellineArmelline Member, PRO Posts: 5,369

    @pokapola said:
    Armelline Ahh okay. The reason why I ask is that I have a lot of actors (one to determine each Attributes/cellValues), and it seems that my game is using a lot of RAM, and the game suddenly would crash and auto exit. Do you think my actors are causing the performance problem?

    Are they all on the scene at once?

  • pokapolapokapola Member Posts: 143

    @Armelline Yep they are all in one scene at once.

Sign In or Register to comment.