I'm currently coding my first decent, non test robot Cruentus? |
I've just released my first 'bot N |
The answer is 'yes, that works'. I assume you are trying to do random movement. One thing you may find from taking a new random approach every tick is that your movement will tend to average out, either along a path of travel or even crossing back and forth between your point of origin, making you vulnerable to an averaged linear targeting or head-on targeting. Then again it may work splendidly. That's for you to discover. A very minor note: you don't really need <= .. you can do < just as well (and in theory more precisely, though it is trivial) an it is a less costly comparison. -- Martin |
The answer is 'yes, that works'. I assume you are trying to do random movement. One thing you may find from taking a new random approach every tick is that your movement will tend to average out, either along a path of travel or even crossing back and forth between your point of origin, making you vulnerable to an averaged linear targeting or head-on targeting. Then again it may work splendidly. That's for you to discover. A very minor note: you don't really need <= .. you can do < just as well (and in theory more precisely, though it is trivial) an it is a less costly comparison. -- Martin |