@clockwork-engine/core
v2.9.0
Published
A TypeScript game engine for deterministic, replayable games with platform-agnostic rendering
Maintainers
Readme
@clockwork-engine/core
Core game engine for deterministic, replayable games with platform-agnostic rendering.
What's Included
- GameEngine - Game state management and deterministic update loop
- GameObject - Base class for game entities with automatic grouping
- GameCanvas - Abstract canvas for rendering integration
- GameRecorder / ReplayManager - Record and replay gameplay with frame-accurate playback
- Serializer - Universal serialization for game state
- Timer / PRNG - Deterministic timing and random number generation
- Vector2D / CollisionGrid - Spatial math and collision detection
- Platform abstraction - Interfaces for rendering, audio, and input
Installation
bun add @clockwork-engine/coreNote: This package requires a platform implementation for actual rendering:
@clockwork-engine/platform-web-pixi- Web/browser with PIXI.js@clockwork-engine/platform-memory- Headless for testing
Usage
import { GameEngine, GameObject, Vector2D, GameCanvas } from '@clockwork-engine/core'
class MyGame extends GameEngine {
setup() {
this.registerGameObject(new Player(new Vector2D(100, 100)))
}
}See the main README for full documentation and examples.
