As I've read through the features tracker, I've read many in which it's stated that there are multiple methods of implementation and they are put on hold until that's figured out. In the case of these, range(), orange(), get_dist(), view(), oview(), and luminosity, one method was chosen, and it was the simplest method at that. I request that these functions be augmented to include varying distance calculations and that get_sight() be added as a get_dist() counterpart.
The new format for distances and views could work in the same manner as Blend().
range(center, Dist, CHEBYSHEV)
orange(center, Dist, CHEBYSHEV)
get_dist(Loc1, Loc2, CHEBYSHEV)
Arguments could be CHEBYSHEV, MANHATTAN, SHIFTED, and EUCLIDEAN,
as detailed here. Maybe even a little help from
table look-ups if necessary?
Here is how get_sight() could look.
get_sight(Loc1, Loc2, SIMPLE)
Arguments could be SIMPLE, DIGITAL, and BRESENHAM,
as detailed here. Or, it could be hooked into how the field-of-vision is calculated, as shown below.
And view() would have two arguments, one for the distance calculation and one for the field of vision calculation.
view(center, Dist, CHEBYSHEV, DEFUALT)
oview(center, Dist, CHEBYSHEV, DEFAULT)
Arguments could include DEFAULT (as I have no idea of the algorithm),
BUCKET,
MUTUAL,
PERMISSIVE,
RAYTRACING,
et cetera.
The world should have a field_of_vision variable to determine how opacity and luminosity is handled on the map. Alternatively, this variable could just override or replace the extra variable in the view() and oview() functions.
P.S. Doubly awesome if you threw in three-dimensional versions of each of the functions, just for good measure.
If there is anything I'm missing and you'd like me to brainstorm, let me know so I can update the request.