.trefvelmyup
How much faster than you the tied bot moves in the direction you are pointing.
Facts
- Address
- 443
- Name
.trefvelmyup- Kind
- Sense: the engine writes it for the DNA to read
- Group
- What it feels through a tie (tref*)
- Written by
- The engine, in the forces and collisions phase: it projects the velocity of the tied bot onto your forward axis and subtracts your
.velup. You read it in the next cycle. - Cleared
- The engine, when you run out of ties or don't have the tie that
.readtieasks for. - Range
- About −23000 to 23000; in practice, much less
- Mutations
- picked as a read (
*)
It takes the tied bot's velocity, projects it onto your forward axis and subtracts your own .velup. It is a relative velocity: positive if the other moves in your direction faster than you do, negative if it falls behind, 0 if you are going at the same speed. It is the same calculation that .refvelup does with the bot you see.
The four trefvelmy* come from two numbers: .trefvelmydn is this same one with its sign flipped, and .trefvelmydx / .trefvelmysx do the same over the lateral axis. If you want the other's velocity measured from its own front, use .trefvelyourup.
' If the tied bot is pulling ahead of me, I thrust to catch up
cond
*.numties 0 >
*.trefvelmyup 0 >
start
*.trefvelmyup .up store
stop