Game development

Quake II visibility-cluster row

Decode one supplied PVS or PHS row into its declared cluster bitset.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

Read the chosen lump-relative offset and expand literal or zero-run bytes to ceil(declared clusters/8). Interpret low bits first, retaining padding-bit observations and the native overrun-clamp warning.

The declared ten-cluster PVS row is 05 02. Its set bits identify clusters 0, 2 and 9. The PHS column points to a different row, even when both use the same source cluster.

Limits

Extracted classic visibility lump only: up to 1 MiB, 65536 clusters and an 8192-byte row. Negative row offsets, inside-table offsets and truncated data reject. Cluster −1 gives the no-cluster zero row. Row width uses the supplied lump count; the engine’s separate leaf count is not supplied. No full BSP, other-stream validation, all-visible fallback, geometry, area-portal, visibility/hearing or map-validity verdict.