Fog of war: unexplored darkness until the dungeon's ground, creatures or towers come close

- explored tiles stay known (saved compactly as bits), enemies are only drawn while in sight; sight runs along open ground, walls block it
- unexplored tiles are black blocks; units, towers, torches, furniture, portals, gate and rival cores in the dark are hidden; minimap and tile info too
- the nearest portal is known from the start; the seer's eye opens a wide area for 20 seconds without remembering it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-04 07:18:55 +01:00
1 parent 7f4d5ca7b4
commit 240e89d9cb
11 files changed
+244 -17

No files matched your search

+6
View File
@@ -114,6 +114,9 @@ pub fn draw_props_solid(g: &Game, cam: &Cam, t: f32) {
for z in z0..=z1 {
for x in x0..=x1 {
let i = idx(x, z);
if !g.map.shown(i) {
continue;
}
let tile = &g.map.t[i];
let l = light_of(tile);
let c = vec3(x as f32 + 0.5, 0.0, z as f32 + 0.5);
@@ -200,6 +203,9 @@ pub fn draw_props_glow(g: &Game, cam: &Cam, t: f32) {
for z in z0..=z1 {
for x in x0..=x1 {
let i = idx(x, z);
if !g.map.shown(i) {
continue;
}
let tile = &g.map.t[i];
let c = vec3(x as f32 + 0.5, 0.0, z as f32 + 0.5);
let h = hash(x, z, 77);