Talk:.edge

From WikiManual
Revision as of 11:00, 25 December 2005 by Griz (talk | contribs)
Jump to: navigation, search

Example:

'this will turn a bot a random number of degrees upon hitting an edge.
314 rnd .aimdx *.edge mult store

This will turn the bot by a rnd amount between 0 an 90 degrees ... clockwise, yes?
and 314 rnd .aimsx *.edge mult store, 0-90 degress CCW?

If one wished to have the bot turn either CW or CCW ...
what would be the best way to do so?
will this work?:

628 rnd .aimdx *.edge mult store
-314 .aimdx store

resulting in the bot rotating 0-90 degress to the left or right?

or:

314 rnd .aimdx *.edge mult store
-314 rnd .aimdx *.edge mult store

or:

314 rnd .aimdx *.edge mult store
314 rnd .aimsx *.edge mult store

resulting in smaller values near 0 degrees being more probable,
ie ... the distribution being more closely centered around zero?
Assuming any of the above would work ...
Which of these would be more costly for the bot?

Also ... perhaps the above is moot, eh?
How much of this is taken care of by the new physics of 2.4.X?
where the velocity and momentum is used to simply 'bounce' the bot
off of the 'edges'?
IOW ... do the physics take care of the bot's heading as part of
the bot's velocity vector, including the direction it is facing ...
or just it's .dx and .dy?
ie ... is it any longer necessary to rotate the bot?
[haven't had time to actually experiment and gather empirical data yet. i will.]
tanks.
Griztalk