Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

Field of view and fog of war in JS/TS v1.0.0

Use this resource to implement or optimise field of view on a game map in JavaScript or TypeScript

New

  • 382 downloads
  • 114 likes
  • 205 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install fog-of-war-visibility-js

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent writes or reviews visibility code against 44 rules covering field-of-view algorithms, update scheduling, typed arrays and canvas or WebGL rendering. It avoids naive per-tile ray casting. You get a fast and correct calculation for full-size maps.

Mostly picked by

Updated November 2, 2026

Card for the “Field of view and fog of war in JS/TS” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • references/: cards on recursive shadowcasting, DDA and octant transforms
  • references/: cards on correct wall and corner handling

Good fit for

  • Your unit reveals the map tile by tile and slows down on large maps
  • Tiles appear or disappear wrongly at wall edges

Not for

    Tags

    • game
    • field of view
    • typescript
    • canvas
    • optimisation

    About

    You say

    “My roguelike recomputes sight by casting a ray per tile. Propose faster shadowcasting and fix the wall corners.”

    Card for the “Field of view and fog of war in JS/TS” skill

    Skill published by pproenca under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to implement or optimise field of view on a game map in JavaScript or TypeScript
    3. Review and adjust the result

    Content preview

    Files

    • AGENTS.md10 KB
    • assets/templates/_template.md1.8 KB
    • LICENSE1.1 KB
    • metadata.json1.6 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • references/_sections.md2.8 KB
    • references/correct-corner-peeking.md1.8 KB
    • references/correct-explored-not-overwritten.md1.8 KB
    • references/correct-permissiveness-model.md1.9 KB
    • references/correct-symmetric-walls.md1.8 KB
    • references/fov-dda-continuous.md2.5 KB
    • references/fov-octant-transforms.md2.4 KB
    • references/fov-radius-bounded-scan.md1.9 KB
    • references/fov-recursive-shadowcasting.md3.5 KB
    • references/fov-single-ray-los.md2 KB
    • references/fov-symmetric-shadowcasting.md2.6 KB
    • references/fov-visibility-polygon.md2.2 KB
    • references/geo-avoid-modulo-deindex.md1.6 KB
    • references/geo-avoid-trig-in-loop.md1.8 KB
    • references/geo-integer-slope-shadows.md1.7 KB
    • references/geo-radius-shape-choice.md1.7 KB
    • references/geo-squared-distance.md1.4 KB
    • references/mem-bitpack-explored.md1.6 KB
    • references/mem-clear-with-fill.md1.6 KB
    • references/mem-generation-stamp.md1.8 KB
    • references/mem-no-hot-loop-closures.md1.7 KB
    • references/mem-reuse-buffers.md1.8 KB
    • references/render-dirty-region-only.md1.6 KB
    • references/render-fade-alpha-lerp.md1.9 KB
    • references/render-imagedata-not-fillrect.md2.3 KB
    • references/render-lowres-soft-upscale.md2 KB
    • references/render-offscreen-fog-layer.md1.9 KB
    • references/render-webgl-texsubimage.md1.9 KB
    • references/scale-cap-recompute-budget.md1.6 KB
    • references/scale-chunk-large-maps.md2 KB
    • references/scale-gameplay-vs-render-culling.md1.7 KB
    • references/scale-shared-team-visibility.md1.7 KB
    • references/scale-spatial-partition-edits.md1.9 KB
    • references/state-bitset-layers.md1.9 KB
    • references/state-flat-1d-index.md1.6 KB
    • references/state-no-string-keys.md1.8 KB
    • references/state-row-major-iteration.md1.5 KB
    • references/state-three-state-encoding.md1.9 KB
    • references/state-typed-arrays.md1.7 KB
    • references/update-debounce-map-edits.md1.7 KB
    • references/update-delta-not-clear.md1.9 KB
    • references/update-dirty-flag.md1.8 KB
    • references/update-merge-explored.md1.9 KB
    • references/update-recompute-on-move.md2.3 KB
    • references/update-refcount-visibility.md2 KB
    • SKILL.md8.9 KB

    Origin and licence

    Listed unmodified

    Author
    pproenca
    Source
    github.com/pproenca/dot-skills/tree/cf93c57cac89d6fc3e4194686000411567f5caf3/skills/.experimental/fog-of-war-js-ts
    Licence
    MIT

    Notice

    « fog-of-war-js-ts » (pproenca, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.