Are long nesting rules a bad idea?

I want the points the players score for each correct answer to double every 10 times they answer a question correctly. So, for example, the first 10 correct answers, they'll score 1 point each time. The next 10 correct answers will earn them 2 points for each answer, the next 10 earns 4 points each, the next 10 earns 8 points, etc.

To do this, I've created a long nesting rule. i.e. when correct answers are >10 and <21 change game.score to game.score +2 otherwise when correct answers are >20 and <31 change game.score to game.score +4 otherwise when correct answers are... etc. I think this particular rule has 14 "otherwises" in it.

Are long nesting rules bad for performance, or are they a decent way to to something like this? Will these type of rules slow down my game? I also have a similar nesting rule for another aspect of the game.

Comments

Sign In or Register to comment.