SS14 PVS (Potentially Visible Set)
Architecture guide for PVS in Space Station 14 — chunk-based spatial partitioning, visibility determination, override types, budgets, Level-of-Detail, leave…
от makura-games★ 74 звезды на GitHub
Установить SS14 PVS (Potentially Visible Set) в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
PVS — Potentially Visible Set
What is PVS
PVS (Potentially Visible Set) is a server system that determines which entities each client sees. Instead of sending the entire world to each player, the server filters the data by distance, visibility, and priority.
Why is this needed:
- Traffic savings - send 500 entities instead of 50,000
- Protection against cheats - the client does not receive data that it should not see
- Performance - the client processes only visible entities
Spatial chunking
Chunk structure
The world is divided into chunks of 8x8 units. Each chunk is tied to a root entity (map or grid):
┌────────────────────────────────────────────────┐
│ Map (MapEntity) │
│ ┌────┬────┬────┬────┐ │
│ │ 0.0│ 1.0│ 2.0│ 3.0│ ← Card chunks │
│ ├────┼────┼────┼────┤ │
│ │ 0,1│ 1,1│ 2,1│ 3,1│ │
│ └────┴────┴────┴────┘ │
│ ┌────┬────┬────┐ │
│ │ 0.0│ 1.0│ 2.0│ ← Grid chunks │
│ ├────┼────┼────┤ (separate grid) │
│ │ 0,1│ 1,1│ 2,1│ │
│ └────┴────┴────┘ │
└────────────────────────────────────────────────┘
PvsChunkLocation
A chunk is uniquely identified by the (EntityUid root, Vector2i indices) pair:
- root —
EntityUidof the map or grid to which the chunk is attached - indices — chunk coordinates in the grid (
position / 8, rounded down)
Contents of the chunk
PvsChunk stores a sorted list of all entities:
- First - entities with the
MetaDataFlags.PvsPriorityflag - Then - anchored entities
- Then - the remaining direct children
- Then - children's children (grandchildren)
- Then - all other descendants recursively
This order is used for Level-of-Detail (LoD) - distant chunks can only send part of the content.
Dirty mechanics of chunks
A chunk is marked as dirty when:
- The entity is added to the chunk
- The entity is removed from the chunk
- Entity moves between chunks
- Entity changes parent
At the next PVS update, the dirty chunk rebuilds its Contents list.
Visibility definition
Viewers
Each session has one or more viewers - entities through whose eyes the player sees the world:
- Main -
session.AttachedEntity(player character) - Subscriptions -
session.ViewSubscriptions(surveillance cameras, ghosts, etc.)
The main viewer is always processed first for prioritization.
ViewBounds
For each viewer, a visibility rectangle is calculated:
- Position — viewer world coordinates +
EyeComponent.Offset - Size —
NetPvsPriorityRange×EyeComponent.PvsScale
Chunks that intersect this rectangle are considered visible.
Chunk processing order
Visible chunks are sorted by distance to the nearest viewer. It means:
- Nearby chunks are processed first
- If the budget is exhausted, distant entities simply will not enter the state
- This creates the effect of “loading the world from the center”
Level-of-Detail (LoD)
PVS uses a simple distance based LoD system:
| LoD level | What's being sent | When |
|---|---|---|
| 0 | Only PvsPriority entities |
Very far |
| 1 | + Anchored entities | Far |
| 2 | + All direct children of the chunk | Average |
| 3 | + Children of children (1 nesting level) | Close |
| 4 | All entities | Inside the regular NetMaxUpdateRange |
Entities with MetaDataFlags.PvsPriority are visible at any distance within the PVS - this is important for walls, doors and other occlusion objects.
Budget (PVS Budget)
The server limits the number of new entities sent to the client per tick:
Budget options
- EnterLimit (CVar:
net.pvs_entity_enter_budget) — maximum of entities entering PVS for the first time or repeatedly per tick - NewLimit (CVar:
net.pvs_entity_budget) - maximum of entities that the client has never seen
How it works
Every tick for each client:
1. ForceSend entities are processed first → budget is NOT applied
2. The real budget from the CVar is applied
3. Overrides are processed → budget is applied
4. Visible chunks are processed → budget is applied
If the budget is exhausted:
→ Entity is not sent in this tick
→ It will hit the next tick (if still visible)
Definition of an "incoming" entity
An entity is considered “in” PVS if:
- The client sees it for the first time (
EntityLastAcked == 0) - She was not in the previous frame (
LastSeen != CurTick - 1) - She was not in the last confirmed frame (
EntityLastAcked < FromTick) - She left and returned to PVS (
LastLeftView >= FromTick)
PVS Override Types
Hierarchy of overrides
┌───────────────────────────────────────────────────────┐
│ ForceSend (global) │
│ • Sent to ALL clients │
│ • Ignores budget │
│ • Ignores visibility mask │
│ • DOES NOT send child │
│ Example: maps, grids │
├─────────────
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл SS14 PVS (Potentially Visible Set)?
Architecture guide for PVS in Space Station 14 — chunk-based spatial partitioning, visibility determination, override types, budgets, Level-of-Detail, leave mechanics, visibility masks, and ExpandPvsEvent
Как установить скилл SS14 PVS (Potentially Visible Set)?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл SS14 PVS (Potentially Visible Set) запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…