Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@suaveplan/bitpacker-game - Bitpacker game plugin
Summary
Game state utilities: quantization, prediction, interpolation, and client-server reconciliation.
Documentation tree
- bitpacker — (no submodules)
- bitpacker — (no submodules)
- integration-manager — (no submodules)
- integration-manager — (no submodules)
- interpolation — (no submodules)
- index — Path:
src/interpolation/interpolation.tsExport:GameInterpolator - interpolation — (no submodules)
- index — Path:
- otel — (no submodules)
- instruments — (no submodules)
- prediction — (no submodules) - rotation-predictor — Path: `bitpacker-game/src/…
- index — Path:
src/prediction/Exports:PositionPredictor,RotationPredictor, motion math, Kalman filter, predicti… - kalman-filter — Path:
bitpacker-game/src/prediction/kalman-filter.tsExport: See source for details. - motion-math — Path:
bitpacker-game/src/prediction/motion-math.tsExport: See source for details. - position-predictor — Path:
bitpacker-game/src/prediction/position-predictor.tsExport: See source for details. - prediction-algorithms — Path:
bitpacker-game/src/prediction/prediction-algorithms.tsExport: See source for details. - prediction — (no submodules) - rotation-predictor — Path: `bitpacker-game/src/…
- rotation-predictor — Path:
bitpacker-game/src/prediction/rotation-predictor.tsExport: See source for details.
- index — Path:
- quantization — (no submodules)
- quantization — (no submodules)
- reconciliation — (no submodules)
- index — Path:
src/reconciliation/reconciliation.tsExport:StateReconciliation - reconciliation — (no submodules)
- index — Path:
- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-gamepackage. Exposes `register…- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-gamepackage. Exposes `register…
- register-schemas — Idempotent integration with
- schema-factory — (no submodules)
- schema-factory — (no submodules)
- schemas — (no submodules)
- schemas — (no submodules)
- state-manager — (no submodules)
- state-manager — (no submodules)
- types.schema — Zod schemas for the public configuration types of
@suaveplan/bitpacker-game: the three sub-options bundles (`Predicti…- types.schema — Zod schemas for the public configuration types of
@suaveplan/bitpacker-game: the three sub-options bundles (`Predicti…
- types.schema — Zod schemas for the public configuration types of
- index — Path:
bitpacker-game/src/index.tsExport: See source for details. - types — Path:
src/types.tsExport: All game-related type definitions and enums
- interpolation — (no submodules)- otel — (no submodules)- instruments — (no submodules)- prediction — (no submodules)- rotation-predictor — Path: `bitpacker-game/src/…
- index — Path:
src/prediction/Exports:PositionPredictor,RotationPredictor, motion math, Kalman filter, predicti… - kalman-filter — Path:
bitpacker-game/src/prediction/kalman-filter.tsExport: See source for details. - motion-math — Path:
bitpacker-game/src/prediction/motion-math.tsExport: See source for details. - position-predictor — Path:
bitpacker-game/src/prediction/position-predictor.tsExport: See source for details. - prediction-algorithms — Path:
bitpacker-game/src/prediction/prediction-algorithms.tsExport: See source for details. - prediction — (no submodules)- rotation-predictor — Path: `bitpacker-game/src/…
- rotation-predictor — Path:
bitpacker-game/src/prediction/rotation-predictor.tsExport: See source for details. - quantization — (no submodules)- quantization — (no submodules)- reconciliation — (no submodules)- index — Path:
src/reconciliation/reconciliation.tsExport:StateReconciliation- reconciliation — (no submodules)- schema-factory — (no submodules)- schema-factory — (no submodules)- schemas — (no submodules)- schemas — (no submodules)- state-manager — (no submodules)- state-manager — (no submodules)- index — Path:
bitpacker-game/src/index.tsExport: See source for details.
- reconciliation — (no submodules)- schema-factory — (no submodules)- schema-factory — (no submodules)- schemas — (no submodules)- schemas — (no submodules)- state-manager — (no submodules)- state-manager — (no submodules)- index — Path:
- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-gamepackage. Exposes `register… - types — Path:
src/types.tsExport: All game-related type definitions and enums - types.schema — Zod schemas for the public configuration types of
@suaveplan/bitpacker-game: the three sub-options bundles (`Predicti… - bitpacker — (no submodules)- integration-manager — (no submodules)- integration-manager — (no submodules)- interpolation — (no submodules)- index — Path:
src/interpolation/interpolation.tsExport:GameInterpolator- interpolation — (no submodules)- otel — (no submodules)- instruments — (no submodules)- prediction — (no submodules)- rotation-predictor — Path: `bitpacker-game/src/…
- index — Path:
src/prediction/Exports:PositionPredictor,RotationPredictor, motion math, Kalman filter, predicti… - kalman-filter — Path:
bitpacker-game/src/prediction/kalman-filter.tsExport: See source for details. - motion-math — Path:
bitpacker-game/src/prediction/motion-math.tsExport: See source for details. - position-predictor — Path:
bitpacker-game/src/prediction/position-predictor.tsExport: See source for details. - prediction-algorithms — Path:
bitpacker-game/src/prediction/prediction-algorithms.tsExport: See source for details. - prediction — (no submodules)- rotation-predictor — Path: `bitpacker-game/src/…
- rotation-predictor — Path:
bitpacker-game/src/prediction/rotation-predictor.tsExport: See source for details.
- quantization — (no submodules)- quantization — (no submodules)- reconciliation — (no submodules)- index — Path:
src/reconciliation/reconciliation.tsExport:StateReconciliation- reconciliation — (no submodules)- schema-factory — (no submodules)- schema-factory — (no submodules)- schemas — (no submodules)- schemas — (no submodules)- state-manager — (no submodules)- state-manager — (no submodules)- index — Path:
bitpacker-game/src/index.tsExport: See source for details.
- reconciliation — (no submodules)- schema-factory — (no submodules)- schema-factory — (no submodules)- schemas — (no submodules)- schemas — (no submodules)- state-manager — (no submodules)- state-manager — (no submodules)- index — Path:
- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-gamepackage. Exposes `register… - types — Path:
src/types.tsExport: All game-related type definitions and enums - types.schema — Zod schemas for the public configuration types of
@suaveplan/bitpacker-game: the three sub-options bundles (`Predicti… - bitpacker — (no submodules)- integration-manager — (no submodules)- integration-manager — (no submodules)- interpolation — (no submodules)- index — Path:
src/interpolation/interpolation.tsExport:GameInterpolator- interpolation — (no submodules)- otel — (no submodules)- instruments — (no submodules)- prediction — (no submodules)- rotation-predictor — Path: `bitpacker-game/src/…
- index — Path:
src/prediction/Exports:PositionPredictor,RotationPredictor, motion math, Kalman filter, predicti… - kalman-filter — Path:
bitpacker-game/src/prediction/kalman-filter.tsExport: See source for details. - motion-math — Path:
bitpacker-game/src/prediction/motion-math.tsExport: See source for details. - position-predictor — Path:
bitpacker-game/src/prediction/position-predictor.tsExport: See source for details. - prediction-algorithms — Path:
bitpacker-game/src/prediction/prediction-algorithms.tsExport: See source for details. - prediction — (no submodules)- rotation-predictor — Path: `bitpacker-game/src/…
- rotation-predictor — Path:
bitpacker-game/src/prediction/rotation-predictor.tsExport: See source for details.
- quantization — (no submodules)- quantization — (no submodules)- reconciliation — (no submodules)- index — Path:
src/reconciliation/reconciliation.tsExport:StateReconciliation- reconciliation — (no submodules)- schema-factory — (no submodules)- schema-factory — (no submodules)- schemas — (no submodules)- schemas — (no submodules)- state-manager — (no submodules)- state-manager — (no submodules)- index — Path:
bitpacker-game/src/index.tsExport: See source for details.
- reconciliation — (no submodules)- schema-factory — (no submodules)- schema-factory — (no submodules)- schemas — (no submodules)- schemas — (no submodules)- state-manager — (no submodules)- state-manager — (no submodules)- index — Path:
- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-gamepackage. Exposes `register… - types — Path:
src/types.tsExport: All game-related type definitions and enums - types.schema — Zod schemas for the public configuration types of
@suaveplan/bitpacker-game: the three sub-options bundles (`Predicti… - bitpacker — (no submodules)- integration-manager — (no submodules) - integration-manager — (no submodules)- interpolation — (no submodules) - index — Path:
src/interpolation/interpolation.tsExport:GameInterpolator- interpolation — (no submodules)- otel — (no submodules) - instruments — (no submodules)- prediction — (no submodules) - index — Path:
src/prediction/Exports:PositionPredictor,RotationPredictor, motion math, Kalman filter, predicti… - kalman-filter — Path:
bitpacker-game/src/prediction/kalman-filter.tsExport: See source for details. - motion-math — Path:
bitpacker-game/src/prediction/motion-math.tsExport: See source for details. - position-predictor — Path:
bitpacker-game/src/prediction/position-predictor.tsExport: See source for details. - prediction-algorithms — Path:
bitpacker-game/src/prediction/prediction-algorithms.tsExport: See source for details. - prediction — (no submodules) - rotation-predictor — Path:
bitpacker-game/src/prediction/rotation-predictor.tsExport: See source for details.
- interpolation — (no submodules)- otel — (no submodules) - instruments — (no submodules)- prediction — (no submodules) - index — Path:
- quantization — (no submodules) - quantization — (no submodules)- reconciliation — (no submodules) - index — Path:
src/reconciliation/reconciliation.tsExport:StateReconciliation- reconciliation — (no submodules)- schema-factory — (no submodules) - schema-factory — (no submodules)- schemas — (no submodules) - schemas — (no submodules)- state-manager — (no submodules) - state-manager — (no submodules)- index — Path:
bitpacker-game/src/index.tsExport: See source for details.
- reconciliation — (no submodules)- schema-factory — (no submodules) - schema-factory — (no submodules)- schemas — (no submodules) - schemas — (no submodules)- state-manager — (no submodules) - state-manager — (no submodules)- index — Path:
- register-schemas — Idempotent integration with
@suaveplan/schema-registryfor the@suaveplan/bitpacker-gamepackage. Exposes `register… - types — Path:
src/types.tsExport: All game-related type definitions and enums - types.schema — Zod schemas for the public configuration types of
@suaveplan/bitpacker-game: the three sub-options bundles (`Predicti…
Install
bun add @suaveplan/bitpacker-game
Usage
import {
GameStateManager,
quantizeVector,
dequantizeVector,
PositionPredictor,
RotationPredictor,
GameInterpolator,
StateReconciliation,
PredictionAlgorithm,
InterpolationMethod,
} from "@suaveplan/bitpacker-game";
// Quantization for network compression
const quantized = quantizeVector({ x: 0.5, y: -0.25, z: 0.75 }, 16);
const restored = dequantizeVector(quantized, 16);
// Position prediction
const predictor = new PositionPredictor({ algorithm: PredictionAlgorithm.ADAPTIVE });
predictor.addPosition({ x: 0, y: 0, z: 0 }, 0);
predictor.addPosition({ x: 10, y: 0, z: 0 }, 1000);
const futurePos = predictor.predictPosition(100); // predicted position at t=100ms
// Interpolation
const interp = new GameInterpolator({ method: InterpolationMethod.HERMITE });
const midPos = interp.interpolatePosition({ x: 0, y: 0, z: 0 }, { x: 10, y: 0, z: 0 }, 0.5);
// Client-server reconciliation
const reconciliation = new StateReconciliation();
const seq = reconciliation.processInput({ moveX: 1, moveY: 0, rotateYaw: 0, rotatePitch: 0, actions: [] }, Date.now());
Modules
src/index.ts—GameStateManager,quantizeVector,dequantizeVectorsrc/types.ts—Vector3,Rotation,PlayerState,PredictionAlgorithm,InterpolationMethod, etc.src/prediction/—PositionPredictor,RotationPredictor, motion math, Kalman filter, prediction algorithmssrc/interpolation/—GameInterpolatorwith 9 interpolation methodssrc/reconciliation/—StateReconciliationfor client prediction + server reconciliation