Implement Fog of War

Implement, tune, debug, or validate soft wall-aware fog of war and gameplay perception in Three.js action games. Use for orthographic or isometric visibility masks, obstacle-aware line of sight, player and enemy vision ranges, hidden-enemy targeting rules, fog shader artifacts such as spokes or seams, mobile ray budgets, lifecycle and menu-state integration, and deterministic fog-of-war tests.

7,717 stars 885 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add MengTo/Skills --skill implement-fog-of-war
Manual install
git clone --depth 1 https://github.com/MengTo/Skills.git /tmp/Skills
mkdir -p ~/.claude/skills
cp -r /tmp/Skills/agent-skills/codex/implement-fog-of-war ~/.claude/skills/implement-fog-of-war

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Implement Fog of War

Build fog of war as a shared perception system with a restrained presentation layer.

## Preserve the architecture

Keep these responsibilities separate:

1. Let deterministic CPU perception own ranges, obstacle intersections, and gameplay visibility.
2. Encode the player's angular visible distances into one fixed-size lookup texture.
3. Let one full-screen shader turn that lookup into soft radial and wall-aware fog.
4. Let gameplay consume perception results directly; never infer combat truth from fog pixels.

Read [mechanics.md](references/mechanics.md) before implementing or changing the algorithm. It records the proven obstacle model, shader composition, calibrated values, state rules, enemy behavior, lighting constraints, and telemetry.

## Inspect before editing

- Locate the authoritative player position, camera, obstacles, scene lifecycle, frame loop, targeting, enemy perception, and render layers.
- Confirm the gameplay ground model. The proven corner-unprojection method assumes a locally horizontal plane; use authoritative surface or terrain reconstruction when elevation varies across the visible area.
- Find existing scene fog, post-processing, renderer creation, review modes, menus, captures, transitions, and disposal paths.
- Read the current tests and recent fog/perception commits before changing constants or ownership.
Read the full skill on GitHub

Details

Skill name
implement-fog-of-war
Repository
MengTo/Skills
Path
agent-skills/codex/implement-fog-of-war/SKILL.md
License
MIT
Repo updated
14 November 2026

FAQ

What does the Implement Fog of War skill do?

Implement, tune, debug, or validate soft wall-aware fog of war and gameplay perception in Three.js action games. Use for orthographic or isometric visibility masks, obstacle-aware line of sight, player and enemy vision ranges, hidden-enemy targeting rules, fog shader artifacts such as spokes or seams, mobile ray budgets, lifecycle and menu-state integration, and deterministic fog-of-war tests.

How do I install the Implement Fog of War skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add MengTo/Skills --skill implement-fog-of-war. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Implement Fog of War popular?

It lives in MengTo/Skills, which has 7,717 GitHub stars and 885 forks.

Related skills

3d Cloth Material

7.7k

MengTo/Skills

Build convincing woven cloth in Three.js, with a thread-level weave normal map, sheen and anisotropic highlights, folds that never stretch the texture, hems with thickness, stitches, seams, frayed edges, fold occlusion, dye and wear variation, and light passing through thin fabric. Use for linen, silk, wool, canvas, curtains, banners, cloaks, tablecloths, tapestries or any 3D drape that currently looks like a plastic sheet, a stretched texture, or a flat coloured plane.

Images, Video & Audio885

3d Falling Leaves

7.7k

MengTo/Skills

Build recognizable falling leaves in world space using instanced geometry, independent tumble, coupled sideways drift, shared wind, scene occlusion, and camera-aware recycling. Use for 3D autumn leaves or drifting foliage in Three.js and similar scenes; use falling-leaves for a 2D canvas overlay.

Images, Video & Audio885

3d Four Seasons

7.7k

MengTo/Skills

Add coordinated spring, summer, fall, and winter states to a 3D scene, blending foliage, sunlight, sky, ground materials, snow, and particles without rebuilding the world. Use for seasonal controls, architectural walkthroughs, and outdoor scenes with four-season transitions.

Images, Video & Audio885

Optimize Threejs Games

7.7k

MengTo/Skills

Profile, diagnose, and improve Three.js or WebGL game performance without regressing gameplay. Use for frame-time drops, CPU/GPU pressure, draw calls, texture and geometry budgets, animation loops, adaptive quality, mobile performance, and browser performance verification.

Software Development885

Fire Smoke Skill Vfx

7.7k

MengTo/Skills

Build the effects of a fire skill as one visual language in Three.js. Flames that read as fire, not as orange fog or cones: ray-marched flame volumes whose turbulence rises with buoyancy (slow at the root, accelerating and stretching as it climbs) instead of scrolling, a temperature ramp from a white-hot core a little above the fuel through yellow and orange to deep red tips, broad brighter licks inside, walls of fire broken into clumps of separate tongues of very different heights with notches between them and licks that detach and go out, a fire whirl wound in helical sheets with a waist and

Software Development885

Performance Profiling

7.7k

MengTo/Skills

Guide performance profiling for Apple platform apps with Instruments, Xcode diagnostics, and MetricKit. Use when investigating app hangs, stutters, high CPU, memory leaks, memory growth, OOM crashes, slow launch, battery drain, thermal issues, App Store performance readiness, or when adding os_signpost and measurement hooks.

Software Development885

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.