Are long nesting rules a bad idea?
whompy
Member Posts: 27
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.
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
Needless to say though, get the GS viewer on a device and do a preview to see what frame rates you are getting etc
The hard part is on a all screen the area you have to work with gets really small cause each rule nested in another shrinks the space you have to select your options. Eventually it become.s impossible.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User