tips for testing conditions
Hi there, I am finally coming up to AI of sorts, in this case it is a spaceship that automatically rights itself based on different variables. I've made it a pretty smooth process, but it could be much better. I basically used a lot of if and if/else statements to perform the necessary actions based on the current X and Y rotation, the mouse deviation, etc etc. I have altogether 10 if statements, although at any one time only about 5 will be executed. I don't know if this is too many, but I know that decision making can slow down games immensely. I was wondering if anyone had any tips for testing states. I.e for right now I'm trying to have everything in set mathematical equations, and everything comes down to just changing the values of a variable. This is really my first time doing anykind of 'AI' (its just testing states and acting upon them) and I don't want to start going about this wrong.
EDIT:
I'll post the source if you want.