Creator · MengTo
Last updated · Sep 1, 2026
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 su
Creator · MengTo
Last updated · Sep 1, 2026
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 su
Creator · MengTo
Last updated · Sep 1, 2026
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 su
Creator · MengTo
Last updated · Sep 1, 2026
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 su
Review then install
Install targets
Codex install prompt
Install the "implement-fog-of-war" agent skill from https://github.com/MengTo/Skills/tree/main/agent-skills/codex/implement-fog-of-war. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"mengto-implement-fog-of-war","task":"Install implement-fog-of-war","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + OpenAI Agents + Browser agents
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add MengTo/Skills --skill implement-fog-of-war
Maintenance
fresh
8d since push
Risk
Safe to try
Quality score needs review
GitHub quality
5.7K
84/100 Quality · 85/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
5.7K GitHub stars
Repo activity
5.7K stars, 685 forks
Maintenance
8d since push
License
MIT
Install
npx skills add MengTo/Skills --skill implement-fog-of-war
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add MengTo/Skills --skill implement-fog-of-warDo not use when
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/mengto-implement-fog-of-war/install
Agent should check
Copy prompt
Task: Use implement-fog-of-war in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install
Install command: npx skills add MengTo/Skills --skill implement-fog-of-war
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/mengto-implement-fog-of-war/install
LLM text format
/api/skills/mengto-implement-fog-of-war/install?format=text
Find alternatives
/api/skills/search?q=implement-fog-of-war&limit=3
Agent prompt
Use implement-fog-of-war for this task. Review https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install, then install with: npx skills add MengTo/Skills --skill implement-fog-of-warRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/mengto-implement-fog-of-war
LLM text
/api/registry/manifest/mengto-implement-fog-of-war?format=text
Install alias
/api/registry/install/mengto-implement-fog-of-war
Recommend
/api/registry/recommend?task=Use%20implement-fog-of-war%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code, OpenAI Agents, Browser agents
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS5.7K GitHub stars
Stars/forks activity
PASS5.7K stars, 685 forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
--- name: implement-fog-of-war description: 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. ---
# 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. - Confirm whether obstacle state changes at runtime. Reuse the same active obstacle collection used by navigation or collision when its geometry is suitable for sight. - Check the working tree early and preserve unrelated changes.
## Implement in dependency order
### 1. Define perception truth
- Represent each sight blocker with a stable footprint, vertical span, and active state. - Intersect a 3D sight segment or ray with both the horizontal footprint and vertical span. - Ignore inactive blockers and cover below the eye-to-target sight line. - Expose: - point-to-point perception for enemies, targeting, and attacks; - a deterministic angular distance fill for the fog lookup. - Use explicit player and enemy ranges. Allow them to differ when the encounter design needs enemies to acquire beyond the player's reveal edge.
### 2. Build the visibility lookup
- Allocate the distance array, byte pixels, and data texture once. - Cast a fixed number of evenly spaced horizontal rays around the player's eye point. - Normalize hit distances by the player vision radius and quantize them into a one-row red-channel texture. - Use linear filtering, horizontal repeat wrapping, no mipmaps, and a bounded mobile/desktop ray budget. - Refresh after meaningful player motion or a short maximum interval. Do not allocate in the frame loop.
### 3. Render one soft overlay
- Use one clip-space plane and one transparent shader material. - Reconstruct each fragment's ground-plane position from the four camera-corner intersections. - Combine: - a clear inner radius and soft outer radial falloff; - a feathered wall boundary sampled from the angular lookup. - Smooth obstacle visibility across neighboring angles. Weight wall fog below the outer radial fog so blockers read as atmosphere, not opaque wedges. - Combine radial and obstacle fog with `max`, then cap final opacity. - Disable depth test, depth write, and tone mapping; render after the world. - Do not introduce a second renderer, render target, composer, or per-ray meshes.
### 4. Integrate gameplay
- Keep simulation presence separate from presentation visibility. - Hide unrevealed enemy renderables through layers or a presentation-only mechanism; do not toggle the actor root if root visibility also controls lifecycle or simulation. - Exclude unrevealed enemies from target lock, aim selection, nearest-target search, HUD counts, and player hit eligibility. - Hide telegraphs that would leak an unseen enemy. - Let enemy acquisition and attacks use their own range plus the same line-of-sight truth. - Clear an active target lock as soon as perception invalidates it. - Cache perception within a simulation phase and refresh after movement when downstream systems need current positions.
### 5. Integrate state and lifecycle
- Enable fog only during active gameplay. - Disable it for menus, inventory, review/capture modes, paused or non-playing states, and stage transitions unless the product explicitly requires otherwise. - Disable it before any early-render branch so a previous frame cannot leak into another state. - Keep atmospheric scene fog separate from fog of war. - Dispose the overlay geometry, material, and lookup texture on teardown. - Publish compact telemetry for ray budget, enabled state, ranges, visible enemies, target visibility, line of sight, and measured distance.
## Tune in the right order
1. Validate obstacle geometry and eye height. 2. Validate player and enemy ranges. 3. Set the fully clear inner radius. 4. Set the outer radial falloff and maximum opacity. 5. Set wall-edge softness. 6. Add angular smoothing until spokes disappear. 7. Reduce obstacle darkness until walls feel like occlusion rather than black rays. 8. Adjust ray budgets only after visual correctness and measured performance.
Do not hide bad obstacle data with extra blur. Do not make the entire scene darker to compensate for weak visibility boundaries.
## Validate
Read [validation.md](references/validation.md) before claiming completion. Run:
- pure perception and opacity tests; - structural render-budget contracts; - integration tests for targeting, layers, lighting, and state; - project lint and build; - real desktop and mobile browser checks in the Codex browser.
Use normal gameplay for visual verification when review modes intentionally disable fog. Judge motion, camera movement, wall edges, gates, seams, and menu transitions—not only a still frame.
## Protect the proven qualities
- Keep the inner play area readable. - Keep the maximum darkness restrained. - Keep walls soft and free of visible radial spokes. - Keep the angle seam invisible. - Keep dynamic gates synchronized with sight. - Keep enemy behavior fair even when enemy vision exceeds player reveal. - Keep one authoritative visibility model and one bounded overlay.
Source provenance
Decision snapshot
5,688 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implement-fog-of-war, ready for a manual X post.
A practical pick for the next repo task: 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 or... 5.7K stars https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x
Listing + install path for implement-fog-of-war: https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x Install: npx skills add MengTo/Skills --skill implement-fog-of-war
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to MengTo but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war/audit)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)MengTo
@mengto
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Review then install
Install targets
Codex install prompt
Install the "implement-fog-of-war" agent skill from https://github.com/MengTo/Skills/tree/main/agent-skills/codex/implement-fog-of-war. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"mengto-implement-fog-of-war","task":"Install implement-fog-of-war","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + OpenAI Agents + Browser agents
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add MengTo/Skills --skill implement-fog-of-war
Maintenance
fresh
8d since push
Risk
Safe to try
Quality score needs review
GitHub quality
5.7K
84/100 Quality · 85/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
5.7K GitHub stars
Repo activity
5.7K stars, 685 forks
Maintenance
8d since push
License
MIT
Install
npx skills add MengTo/Skills --skill implement-fog-of-war
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add MengTo/Skills --skill implement-fog-of-warDo not use when
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/mengto-implement-fog-of-war/install
Agent should check
Copy prompt
Task: Use implement-fog-of-war in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install
Install command: npx skills add MengTo/Skills --skill implement-fog-of-war
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/mengto-implement-fog-of-war/install
LLM text format
/api/skills/mengto-implement-fog-of-war/install?format=text
Find alternatives
/api/skills/search?q=implement-fog-of-war&limit=3
Agent prompt
Use implement-fog-of-war for this task. Review https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install, then install with: npx skills add MengTo/Skills --skill implement-fog-of-warRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/mengto-implement-fog-of-war
LLM text
/api/registry/manifest/mengto-implement-fog-of-war?format=text
Install alias
/api/registry/install/mengto-implement-fog-of-war
Recommend
/api/registry/recommend?task=Use%20implement-fog-of-war%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code, OpenAI Agents, Browser agents
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS5.7K GitHub stars
Stars/forks activity
PASS5.7K stars, 685 forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
--- name: implement-fog-of-war description: 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. ---
# 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. - Confirm whether obstacle state changes at runtime. Reuse the same active obstacle collection used by navigation or collision when its geometry is suitable for sight. - Check the working tree early and preserve unrelated changes.
## Implement in dependency order
### 1. Define perception truth
- Represent each sight blocker with a stable footprint, vertical span, and active state. - Intersect a 3D sight segment or ray with both the horizontal footprint and vertical span. - Ignore inactive blockers and cover below the eye-to-target sight line. - Expose: - point-to-point perception for enemies, targeting, and attacks; - a deterministic angular distance fill for the fog lookup. - Use explicit player and enemy ranges. Allow them to differ when the encounter design needs enemies to acquire beyond the player's reveal edge.
### 2. Build the visibility lookup
- Allocate the distance array, byte pixels, and data texture once. - Cast a fixed number of evenly spaced horizontal rays around the player's eye point. - Normalize hit distances by the player vision radius and quantize them into a one-row red-channel texture. - Use linear filtering, horizontal repeat wrapping, no mipmaps, and a bounded mobile/desktop ray budget. - Refresh after meaningful player motion or a short maximum interval. Do not allocate in the frame loop.
### 3. Render one soft overlay
- Use one clip-space plane and one transparent shader material. - Reconstruct each fragment's ground-plane position from the four camera-corner intersections. - Combine: - a clear inner radius and soft outer radial falloff; - a feathered wall boundary sampled from the angular lookup. - Smooth obstacle visibility across neighboring angles. Weight wall fog below the outer radial fog so blockers read as atmosphere, not opaque wedges. - Combine radial and obstacle fog with `max`, then cap final opacity. - Disable depth test, depth write, and tone mapping; render after the world. - Do not introduce a second renderer, render target, composer, or per-ray meshes.
### 4. Integrate gameplay
- Keep simulation presence separate from presentation visibility. - Hide unrevealed enemy renderables through layers or a presentation-only mechanism; do not toggle the actor root if root visibility also controls lifecycle or simulation. - Exclude unrevealed enemies from target lock, aim selection, nearest-target search, HUD counts, and player hit eligibility. - Hide telegraphs that would leak an unseen enemy. - Let enemy acquisition and attacks use their own range plus the same line-of-sight truth. - Clear an active target lock as soon as perception invalidates it. - Cache perception within a simulation phase and refresh after movement when downstream systems need current positions.
### 5. Integrate state and lifecycle
- Enable fog only during active gameplay. - Disable it for menus, inventory, review/capture modes, paused or non-playing states, and stage transitions unless the product explicitly requires otherwise. - Disable it before any early-render branch so a previous frame cannot leak into another state. - Keep atmospheric scene fog separate from fog of war. - Dispose the overlay geometry, material, and lookup texture on teardown. - Publish compact telemetry for ray budget, enabled state, ranges, visible enemies, target visibility, line of sight, and measured distance.
## Tune in the right order
1. Validate obstacle geometry and eye height. 2. Validate player and enemy ranges. 3. Set the fully clear inner radius. 4. Set the outer radial falloff and maximum opacity. 5. Set wall-edge softness. 6. Add angular smoothing until spokes disappear. 7. Reduce obstacle darkness until walls feel like occlusion rather than black rays. 8. Adjust ray budgets only after visual correctness and measured performance.
Do not hide bad obstacle data with extra blur. Do not make the entire scene darker to compensate for weak visibility boundaries.
## Validate
Read [validation.md](references/validation.md) before claiming completion. Run:
- pure perception and opacity tests; - structural render-budget contracts; - integration tests for targeting, layers, lighting, and state; - project lint and build; - real desktop and mobile browser checks in the Codex browser.
Use normal gameplay for visual verification when review modes intentionally disable fog. Judge motion, camera movement, wall edges, gates, seams, and menu transitions—not only a still frame.
## Protect the proven qualities
- Keep the inner play area readable. - Keep the maximum darkness restrained. - Keep walls soft and free of visible radial spokes. - Keep the angle seam invisible. - Keep dynamic gates synchronized with sight. - Keep enemy behavior fair even when enemy vision exceeds player reveal. - Keep one authoritative visibility model and one bounded overlay.
Source provenance
Decision snapshot
5,688 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implement-fog-of-war, ready for a manual X post.
A practical pick for the next repo task: 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 or... 5.7K stars https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x
Listing + install path for implement-fog-of-war: https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x Install: npx skills add MengTo/Skills --skill implement-fog-of-war
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to MengTo but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war/audit)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)MengTo
@mengto
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Review then install
Install targets
Codex install prompt
Install the "implement-fog-of-war" agent skill from https://github.com/MengTo/Skills/tree/main/agent-skills/codex/implement-fog-of-war. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"mengto-implement-fog-of-war","task":"Install implement-fog-of-war","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + OpenAI Agents + Browser agents
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add MengTo/Skills --skill implement-fog-of-war
Maintenance
fresh
8d since push
Risk
Safe to try
Quality score needs review
GitHub quality
5.7K
84/100 Quality · 85/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
5.7K GitHub stars
Repo activity
5.7K stars, 685 forks
Maintenance
8d since push
License
MIT
Install
npx skills add MengTo/Skills --skill implement-fog-of-war
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add MengTo/Skills --skill implement-fog-of-warDo not use when
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/mengto-implement-fog-of-war/install
Agent should check
Copy prompt
Task: Use implement-fog-of-war in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install
Install command: npx skills add MengTo/Skills --skill implement-fog-of-war
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/mengto-implement-fog-of-war/install
LLM text format
/api/skills/mengto-implement-fog-of-war/install?format=text
Find alternatives
/api/skills/search?q=implement-fog-of-war&limit=3
Agent prompt
Use implement-fog-of-war for this task. Review https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install, then install with: npx skills add MengTo/Skills --skill implement-fog-of-warRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/mengto-implement-fog-of-war
LLM text
/api/registry/manifest/mengto-implement-fog-of-war?format=text
Install alias
/api/registry/install/mengto-implement-fog-of-war
Recommend
/api/registry/recommend?task=Use%20implement-fog-of-war%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code, OpenAI Agents, Browser agents
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS5.7K GitHub stars
Stars/forks activity
PASS5.7K stars, 685 forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
--- name: implement-fog-of-war description: 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. ---
# 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. - Confirm whether obstacle state changes at runtime. Reuse the same active obstacle collection used by navigation or collision when its geometry is suitable for sight. - Check the working tree early and preserve unrelated changes.
## Implement in dependency order
### 1. Define perception truth
- Represent each sight blocker with a stable footprint, vertical span, and active state. - Intersect a 3D sight segment or ray with both the horizontal footprint and vertical span. - Ignore inactive blockers and cover below the eye-to-target sight line. - Expose: - point-to-point perception for enemies, targeting, and attacks; - a deterministic angular distance fill for the fog lookup. - Use explicit player and enemy ranges. Allow them to differ when the encounter design needs enemies to acquire beyond the player's reveal edge.
### 2. Build the visibility lookup
- Allocate the distance array, byte pixels, and data texture once. - Cast a fixed number of evenly spaced horizontal rays around the player's eye point. - Normalize hit distances by the player vision radius and quantize them into a one-row red-channel texture. - Use linear filtering, horizontal repeat wrapping, no mipmaps, and a bounded mobile/desktop ray budget. - Refresh after meaningful player motion or a short maximum interval. Do not allocate in the frame loop.
### 3. Render one soft overlay
- Use one clip-space plane and one transparent shader material. - Reconstruct each fragment's ground-plane position from the four camera-corner intersections. - Combine: - a clear inner radius and soft outer radial falloff; - a feathered wall boundary sampled from the angular lookup. - Smooth obstacle visibility across neighboring angles. Weight wall fog below the outer radial fog so blockers read as atmosphere, not opaque wedges. - Combine radial and obstacle fog with `max`, then cap final opacity. - Disable depth test, depth write, and tone mapping; render after the world. - Do not introduce a second renderer, render target, composer, or per-ray meshes.
### 4. Integrate gameplay
- Keep simulation presence separate from presentation visibility. - Hide unrevealed enemy renderables through layers or a presentation-only mechanism; do not toggle the actor root if root visibility also controls lifecycle or simulation. - Exclude unrevealed enemies from target lock, aim selection, nearest-target search, HUD counts, and player hit eligibility. - Hide telegraphs that would leak an unseen enemy. - Let enemy acquisition and attacks use their own range plus the same line-of-sight truth. - Clear an active target lock as soon as perception invalidates it. - Cache perception within a simulation phase and refresh after movement when downstream systems need current positions.
### 5. Integrate state and lifecycle
- Enable fog only during active gameplay. - Disable it for menus, inventory, review/capture modes, paused or non-playing states, and stage transitions unless the product explicitly requires otherwise. - Disable it before any early-render branch so a previous frame cannot leak into another state. - Keep atmospheric scene fog separate from fog of war. - Dispose the overlay geometry, material, and lookup texture on teardown. - Publish compact telemetry for ray budget, enabled state, ranges, visible enemies, target visibility, line of sight, and measured distance.
## Tune in the right order
1. Validate obstacle geometry and eye height. 2. Validate player and enemy ranges. 3. Set the fully clear inner radius. 4. Set the outer radial falloff and maximum opacity. 5. Set wall-edge softness. 6. Add angular smoothing until spokes disappear. 7. Reduce obstacle darkness until walls feel like occlusion rather than black rays. 8. Adjust ray budgets only after visual correctness and measured performance.
Do not hide bad obstacle data with extra blur. Do not make the entire scene darker to compensate for weak visibility boundaries.
## Validate
Read [validation.md](references/validation.md) before claiming completion. Run:
- pure perception and opacity tests; - structural render-budget contracts; - integration tests for targeting, layers, lighting, and state; - project lint and build; - real desktop and mobile browser checks in the Codex browser.
Use normal gameplay for visual verification when review modes intentionally disable fog. Judge motion, camera movement, wall edges, gates, seams, and menu transitions—not only a still frame.
## Protect the proven qualities
- Keep the inner play area readable. - Keep the maximum darkness restrained. - Keep walls soft and free of visible radial spokes. - Keep the angle seam invisible. - Keep dynamic gates synchronized with sight. - Keep enemy behavior fair even when enemy vision exceeds player reveal. - Keep one authoritative visibility model and one bounded overlay.
Source provenance
Decision snapshot
5,688 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implement-fog-of-war, ready for a manual X post.
A practical pick for the next repo task: 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 or... 5.7K stars https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x
Listing + install path for implement-fog-of-war: https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x Install: npx skills add MengTo/Skills --skill implement-fog-of-war
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to MengTo but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war/audit)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)MengTo
@mengto
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Review then install
Install targets
Codex install prompt
Install the "implement-fog-of-war" agent skill from https://github.com/MengTo/Skills/tree/main/agent-skills/codex/implement-fog-of-war. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"mengto-implement-fog-of-war","task":"Install implement-fog-of-war","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + OpenAI Agents + Browser agents
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add MengTo/Skills --skill implement-fog-of-war
Maintenance
fresh
8d since push
Risk
Safe to try
Quality score needs review
GitHub quality
5.7K
84/100 Quality · 85/100 Trust
Coverage tags
Review notes
Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Review then installGood shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
Audit
Safe to tryA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Use as the primary candidate after human or sandbox review.
Stars
5.7K GitHub stars
Repo activity
5.7K stars, 685 forks
Maintenance
8d since push
License
MIT
Install
npx skills add MengTo/Skills --skill implement-fog-of-war
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add MengTo/Skills --skill implement-fog-of-warDo not use when
Agent safety v2
Good audit and safety signals with no high-risk permission hints in public metadata.
Review the audit page, then allow agent install in a sandboxed workflow.
medium
Skill may drive a browser or interact with web pages.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/mengto-implement-fog-of-war/install
Agent should check
Copy prompt
Task: Use implement-fog-of-war in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20implement-fog-of-war%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install
Install command: npx skills add MengTo/Skills --skill implement-fog-of-war
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/mengto-implement-fog-of-war/install
LLM text format
/api/skills/mengto-implement-fog-of-war/install?format=text
Find alternatives
/api/skills/search?q=implement-fog-of-war&limit=3
Agent prompt
Use implement-fog-of-war for this task. Review https://www.openagentskill.com/api/skills/mengto-implement-fog-of-war/install, then install with: npx skills add MengTo/Skills --skill implement-fog-of-warRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/mengto-implement-fog-of-war
LLM text
/api/registry/manifest/mengto-implement-fog-of-war?format=text
Install alias
/api/registry/install/mengto-implement-fog-of-war
Recommend
/api/registry/recommend?task=Use%20implement-fog-of-war%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code, OpenAI Agents, Browser agents
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Coding agents
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Good shortlist signal, but the agent should review audit notes, install policy, and outcome evidence before running it.
GitHub adoption
PASS5.7K GitHub stars
Stars/forks activity
PASS5.7K stars, 685 forks; issue activity unavailable in current metadata
Recent maintenance
PASS8d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Use as the primary candidate after human or sandbox review.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
--- name: implement-fog-of-war description: 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. ---
# 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. - Confirm whether obstacle state changes at runtime. Reuse the same active obstacle collection used by navigation or collision when its geometry is suitable for sight. - Check the working tree early and preserve unrelated changes.
## Implement in dependency order
### 1. Define perception truth
- Represent each sight blocker with a stable footprint, vertical span, and active state. - Intersect a 3D sight segment or ray with both the horizontal footprint and vertical span. - Ignore inactive blockers and cover below the eye-to-target sight line. - Expose: - point-to-point perception for enemies, targeting, and attacks; - a deterministic angular distance fill for the fog lookup. - Use explicit player and enemy ranges. Allow them to differ when the encounter design needs enemies to acquire beyond the player's reveal edge.
### 2. Build the visibility lookup
- Allocate the distance array, byte pixels, and data texture once. - Cast a fixed number of evenly spaced horizontal rays around the player's eye point. - Normalize hit distances by the player vision radius and quantize them into a one-row red-channel texture. - Use linear filtering, horizontal repeat wrapping, no mipmaps, and a bounded mobile/desktop ray budget. - Refresh after meaningful player motion or a short maximum interval. Do not allocate in the frame loop.
### 3. Render one soft overlay
- Use one clip-space plane and one transparent shader material. - Reconstruct each fragment's ground-plane position from the four camera-corner intersections. - Combine: - a clear inner radius and soft outer radial falloff; - a feathered wall boundary sampled from the angular lookup. - Smooth obstacle visibility across neighboring angles. Weight wall fog below the outer radial fog so blockers read as atmosphere, not opaque wedges. - Combine radial and obstacle fog with `max`, then cap final opacity. - Disable depth test, depth write, and tone mapping; render after the world. - Do not introduce a second renderer, render target, composer, or per-ray meshes.
### 4. Integrate gameplay
- Keep simulation presence separate from presentation visibility. - Hide unrevealed enemy renderables through layers or a presentation-only mechanism; do not toggle the actor root if root visibility also controls lifecycle or simulation. - Exclude unrevealed enemies from target lock, aim selection, nearest-target search, HUD counts, and player hit eligibility. - Hide telegraphs that would leak an unseen enemy. - Let enemy acquisition and attacks use their own range plus the same line-of-sight truth. - Clear an active target lock as soon as perception invalidates it. - Cache perception within a simulation phase and refresh after movement when downstream systems need current positions.
### 5. Integrate state and lifecycle
- Enable fog only during active gameplay. - Disable it for menus, inventory, review/capture modes, paused or non-playing states, and stage transitions unless the product explicitly requires otherwise. - Disable it before any early-render branch so a previous frame cannot leak into another state. - Keep atmospheric scene fog separate from fog of war. - Dispose the overlay geometry, material, and lookup texture on teardown. - Publish compact telemetry for ray budget, enabled state, ranges, visible enemies, target visibility, line of sight, and measured distance.
## Tune in the right order
1. Validate obstacle geometry and eye height. 2. Validate player and enemy ranges. 3. Set the fully clear inner radius. 4. Set the outer radial falloff and maximum opacity. 5. Set wall-edge softness. 6. Add angular smoothing until spokes disappear. 7. Reduce obstacle darkness until walls feel like occlusion rather than black rays. 8. Adjust ray budgets only after visual correctness and measured performance.
Do not hide bad obstacle data with extra blur. Do not make the entire scene darker to compensate for weak visibility boundaries.
## Validate
Read [validation.md](references/validation.md) before claiming completion. Run:
- pure perception and opacity tests; - structural render-budget contracts; - integration tests for targeting, layers, lighting, and state; - project lint and build; - real desktop and mobile browser checks in the Codex browser.
Use normal gameplay for visual verification when review modes intentionally disable fog. Judge motion, camera movement, wall edges, gates, seams, and menu transitions—not only a still frame.
## Protect the proven qualities
- Keep the inner play area readable. - Keep the maximum darkness restrained. - Keep walls soft and free of visible radial spokes. - Keep the angle seam invisible. - Keep dynamic gates synchronized with sight. - Keep enemy behavior fair even when enemy vision exceeds player reveal. - Keep one authoritative visibility model and one bounded overlay.
Source provenance
Decision snapshot
5,688 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for implement-fog-of-war, ready for a manual X post.
A practical pick for the next repo task: 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 or... 5.7K stars https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x
Listing + install path for implement-fog-of-war: https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=x Install: npx skills add MengTo/Skills --skill implement-fog-of-war
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to MengTo but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war/audit)
[](https://www.openagentskill.com/skills/mengto-implement-fog-of-war?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)MengTo
@mengto
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Review then install
Permission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
network or browser access
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness