I implemented terrain discovery based on the people's locations. Right now it just uses a cheap range calculation around the person's location, so it is possible for them to see things even if they don't have a line-of-sight on it.
As always, find the latest revision at http://bitbucket.org/willismichael/terra-incognita
Here is the function (found in /src/model/update.clj) that determines the visibility from a given location:
(defn- visibility [[x y z]]
(let [h-range (range -6 7)
(for [dx h-range dy h-range dz [-2 -1 0 1 2]
:let [x (+ x dx) y (+ y dy) z (+ z dz)]
:when (< (+ (* dx dx) (* dy dy) (* dz dz)) 36)]
[x y z])]
(zipmap nodes (map (partial world-get @wrld) nodes))))
It's quite terse, but don't let that scare you. The first line takes a location as a parameter, and deconstructs it into x,y,z coordinates. Next, it creates h-range, where (range -6 7) is just short for [-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6]. Those are the horizontal coordinates relative to the viewer. The "for" statement evaluates for every possible combination of relative coordinates that we're interested in, from -6,-6,-2 all the way to 6,6,2. These are filtered using the distance formula (so that visibility has a radius of 6, rather than being a square)
Finally, all of the coordinates that meet the criteria are used to pull information from the world.
One thing you could play with is the visibility range and radius. For example, if you want to change horizontal visibility from 6 to 20, change (range -6 7) to (range -20 21), and change 36 to 400 (that's 20 squared). Or, if you want them to be aware of several layers in the ground beneath them, change dz [-2 -1 0 1 2] to dz (range -20 2)