ss14-virtual-controller-core
БесплатноБез исполняемых скриптовНе проверенParses the VirtualController architecture in Space Station 14: the UpdateBeforeSolve/UpdateAfterSolve cycle, order through UpdatesBefore/UpdatesAfter…
от makura-games★ 74 звезды на GitHubОб этом скилле
VirtualController: Architecture and Cycle
Use this skill as an architectural playbook for VirtualController :)
Keep your focus on fresh code and check its relevance through git log/blame (cutoff: 2024-02-20).
What to download first
references/fresh-pattern-catalog.md- patterns with an obvious freshness status (Use/Limited) ✅references/rejected-snippets.md- zones that cannot be taken as a standard ⚠️references/docs-context.md- how to use docs safely
Source of truth
- The codebase is the primary source of truth.
- Documentation - secondary layer (terms, intent, diagnostics).
- Any site older than two years or with a TODO/problematic comment on the topic should not be included in the reference rules.
VirtualController mental model
VirtualControllerisEntitySystemwhich subscribes toPhysicsUpdateBeforeSolveEventandPhysicsUpdateAfterSolveEvent.- The order of calling the controller is specified via
UpdatesBefore/UpdatesAfter. - Hooks
UpdateBeforeSolveandUpdateAfterSolveare called on each physics substep. - The
predictionparameter tells whether predict simulation is running on the client. frameTime— time of one substep, not the entire tick.- The performance of controllers is monitored separately through built-in histograms (
BeforeMonitor/AfterMonitor).
Layer scheme
- Engine layer:
VirtualController,SharedPhysicsSystem, before/after solve events, solver/contact pipeline, special-casingKinematicController. - Shared layer:
SharedMoverController,TileFrictionController,SharedConveyorController,ClimbSystem. - Server layer:
PullController,RandomWalkController,ChasingWalkSystem,ChaoticJumpSystem,MoverController,ConveyorController. - Client layer:
MoverController,ConveyorController-stub for prediction/network presence, prediction hooks viaUpdateIsPredictedEvent.
Patterns
- Add
UpdatesBefore/UpdatesAfterbeforebase.Initialize()- otherwise the order hook will be fixed incorrectly. - In
UpdateBeforeSolvedo earlycontinuebyprediction/body.Predictso as not to break the predict. - Use
AwakeBodiesas the main set for per-step physical logic. - For
KinematicController, use manual damping via helper movement methods and thenSetLinearVelocity/SetAngularVelocity. - For heavy calculations inside the controller, separate the calculation phase (parallel job) from the phase of applying the results (main thread).
- For relay management, use the
SetRelay/RemoveRelayAPI methods, rather than manually adding/removing components. - For container-eject scenarios, where the entity must immediately appear “outside”, use
ForciblySetClimbingas a safe post-eject transition. - Keep
UpdateBeforeSolvedeterministic: minimum hidden state, minimum nondeterministic sources. - To control regressions, check the physics monitors of the controllers before/after the change.
- For movement systems, maintain an invariant: mob movement and tile friction must occur in a consistent order.
Anti-patterns
- Configure
UpdatesBefore/UpdatesAfterafterbase.Initialize(). - Copy TODO-heavy sections as an architectural standard.
- Write a controller that depends on “one call per tick” and ignores substeps.
- Perform expensive lookup/alloc operations without cache-query in a hot physics loop.
- Bypass the relay API using direct
RemComp/EnsureCompin the gameplay code. - Consider the empty client
ConveyorController“superfluous” and remove it from the predictor scheme. - Try to use old pre-cutoff fragments as a basis for new solutions.
- Treat mispredict with “magic guards” instead of correcting the source of desync.
- Interfere with transform movement and physical impulses without a clear cause-and-effect model.
- Ignore warning comments about fragile logic (
slop,hack,temporary).
Low-level Box2D/Physics Internals
- The simulation goes through
SimulateWorld: each substep raises before/after events, then broadphase/contact/solve. - Controllers are executed before the solver (
UpdateBeforeSolve) and after the solver (UpdateAfterSolve) on each substep. AwakeBodies- a key runtime set of bodies participating in the active simulation and controllers.- Generation and recalculation of contacts are based on broadphase overlap + narrowphase manifold update.
- For
KinematicControllerthere are separate branches in solver/contact logic, so it cannot be treated as a regularDynamic. - Any logic that changes speeds/pulses in controllers must take into account prediction and body mode.
Code examples
1) Subscribe VirtualController to before/after solve
public override void Initialize()
{
base.Initialize();
var updatesBefore = UpdatesBefore.ToArray();
var updatesAfter = UpdatesAfter.ToArray();
// The controller receives both physics hooks in one order graph.
SubscribeLocalEvent<Physics
Установить ss14-virtual-controller-core в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ss14-virtual-controller-core?
Parses the VirtualController architecture in Space Station 14: the UpdateBeforeSolve/UpdateAfterSolve cycle, order through UpdatesBefore/UpdatesAfter, prediction semantics and connection with low-level physics Box2D (substeps, contacts, solver). Use when you need to deeply understand the system before expanding or debugging.
Как установить скилл ss14-virtual-controller-core?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ss14-virtual-controller-core запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set 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…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic