Fog of war: unexplored is black, fades ease into it with no stepped rim (t17)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 12:59:00 -04:00
co-authored by Claude Opus 5.5
parent a18dcda8a4
commit 14194cb4be
7 changed files with 36 additions and 17 deletions
+2 -1
View File
@@ -25,7 +25,8 @@ function fogLook(cx, cy) {
if (x < 0 || y < 0 || x >= W || y >= H) break;
const ph = PH[mat[y * W + x]];
if (hit < 0 && (ph === PH_SOLID || ph === PH_POWDER)) hit = d;
const v = Math.min(255, (48 - d) * 255 / 16, hit < 0 ? 255 : (8 - d + hit) * 255 / 8);
// into rock, sight fades out over 8 grains from however bright it arrived
const v = Math.min(255, (48 - d) * 255 / 16) * (hit < 0 ? 1 : (8 - d + hit) / 8);
if (v <= 0) break;
fogMark(x, y, v);
}