Folks, I'm sorry but I just had to do something about the eye value formula for 2.43y. The current forumla dates back to before bots had variable size and the recent change to make bot sizes vary over an even larger range was showing up some problems. In particular, eye values can currently go negative when a very large bot looks at something close up.
I think what I've done it is fairly backward compatable in that bots that trigger at eye values > 0 or >20 or >50 should still pretty much behave exactly the same as those points pretty much still mean about the same thing as far as actual distance. But one thing this change does do is add tremendous resolution when viewing things close up. It also increases the effective distance at whcih larger bots become visible.
Okay, first let's talk about how far bots can see. Assume two bots A and B. A has radius 'a' and B as radius 'b' A is looking at B. B will show up in A's eye (A's eye value will be some positive value) if the distance between their centers is less than a+b+1440. It used to be just a+1440. What this means now is that instead of "seeing" a bot's center, bots effectivly now "see" the other bot's edge. This means that bots with large radii will be visible when their centers are farther away than will bots with small radii. It's the closeness of the bot's edge that counts. FYI, the largest possible bot with body of 32000 with today's code can have a radius somewhere around 450 I think, so this change can be significant when it comes to seeing very fat bots far off.
So, bots are visible to each other if the distance between their edges is less than 1440. How do eye values vary with the distance D between edges? Basically, its an inverse square relationship. The value V of a bot's eye is bascially given by:
V = 1/(D/1440)^2
That is, a bot's eye is the inverse square of how close the bot is as a percentage of the maximum sight distance (currently fixed at 1440 for all bots and all eye widths). This is pretty close to the previous formula, but cleaner and without some junk that refers to the old fixed radius size. In practice, it means eye values are pretty much the same as they've always been unless the thing your looking at is very close in which case, eye values can be significantly higher. At close range, bot's eyes become very sensitive to distance changes and can have values up to the maximum value for V of 32000.
Well, okay, not quite. The real formula is:
V = 1/((D+10)/1440)^2 for D>=0
What is that D+10 all about? Well, if you do the math, the first formula gives eyevalues of over 32000 when bots are still separated by a little space (distances of about 8 or less). I wanted to do two things. First, I wanted eyevalues to change up close, for bots to be able to tell the difference between being distance 2 away and distance 6 away for example. And I wanted bots to be able to tell the difference between being really really close to something and touching, intersecting or being inside it. The D+10 does this
In cases where bots are touching, intersecting, when the viewing bot is inside another bot (or inside a shape) or when the bot being viewed is inside it, V=32000. The above formula will not give values above 20736 for bots that don't touch each other. This means bots do not get positional information for things inside themselves or when they in turn are inside something else - their eye values get "maxed out". They will get directional information about things inside them I.e. the eyes that see something will be at 32000, those that don't will be 0. I'd be happy to entertain the suggestion that bots shoudl not even get directional information about things inside them - that eyes should be 0 in such cases - but, well, the above is how it is for 2.43y.
I should point out that I don't currently take the curve of the viewed bot's edge into account. That is, imagine a large bot being viewed close up such that multiple eyes can see it. Today, all eyes will register the same value, as if the bot were presenting a straight edge instead of a curved one. This is a temporary short coming that I plan to address soon. I have already done so for shapes. When a bot's eye sees a shape, the eye value of each eye is a function of the closet part of the shape in that eye, typically one side of the eye or the other unless viewing a corner. This lets bots make out things such as shape corners in great detail, particularly when they are close up.
I should point out that it also has the nice side effect of serving to make small bots huddled against shape walls pretty hard to see. Imagine a bot's eye hitting a small bot hiding against a shape wall. Unless the eye is straight on to the wall, it is likely one side of the eye or the other hits the shape and that that distance is less than that to the viewed bot's edge. The eye will see the shape, not the bot. Cool, huh?
And while we are on the subject, diving into a shape is a good way to hide. Shapes can be penetrated to some degree, particularly if the bot continually thursts into them. Doing this is a great way to evade a pursurer (or jump out and surprise prey).
Anyway, before you condem this change, let's try it out. If I hadn't said anything, you probably wouldn't have noticed anyway! Sp, give 2.43y a whirl and lets see what there is to see (pun intended). Should be out later this weekend.