Welcome to Clockwork
Welcome to Clockwork
What is Clockwork?
Clockwork is a TypeScript/JavaScript-first modular game engine package ecosystem focused on ECS runtime systems, deterministic scheduling, and a WebGL2 renderer stack. Core runtime systems (ECS, scheduler, events, serialization, assets, app/plugin runtime) are isolated from platform and renderer concerns, so teams can install only the pieces they need.
Key Features
- Modular Packages - Install only the engine modules your project needs
- ECS Runtime Core - Generational entities, component stores, queries, command buffering, and resources
- Deterministic Scheduler - Fixed-step update loop with ordered stages and determinism checks
- Event and Asset Pipelines - Typed event bus plus asset loading, dependency tracking, and hot-reload support
- Plugin-Driven App Runtime - App builder, plugin lifecycle management, and ownership-safe registries
- WebGL2 Renderer Stack - Dedicated renderer packages for GL, shaders, materials, and render passes
Quick Example
import { AppBuilder, HeadlessRendererPlugin } from 'qti-clockwork-app'
const app = new AppBuilder().use(HeadlessRendererPlugin).build()
app.run()
await app.step(1 / 60)
await app.shutdown()
Getting Started
New to Clockwork? Start here:
- Installation Guide - Install
qti-clockwork-*packages in your project - Quick Start - Run your first engine loop
- Getting Started - Learn core runtime concepts and package layout
Documentation Structure
Core Concepts
- Getting Started - Architecture, package groups, and runtime flow
- Architecture Overview - Layered design and package responsibilities
- Runtime Lifecycle - Build, run, step, and shutdown phases
- Plugin System - Dependency ordering and registry ownership
- Runtime Sequences - Sequence diagrams for build, frame, and reload flows
Package Reference
- Packages Overview - Core, renderer, platform, and app package map
- Reference: Packages - Package-by-package runtime summary
- Reference: API Map - Main exported classes and where they live
- Reference: Configuration - Tooling config reference
- Reference: API Index - Method-level API tables for each package
- Reference: Runnable Examples - Copy-paste examples by subsystem
- Reference: Error Catalog - Error signatures, causes, and fixes
Tooling
- Configuration -
tsconfig/jsconfig, Vitest aliases, ESLint, and Prettier - Installation - Environment setup and package installation
- Testing - Testing Clockwork-based code in your project
- Quick Start - Fastest way to run Clockwork in your app
Workflows
- Quick Start - First runtime loop in your project
- Installation - First-time setup and troubleshooting
- Guide: Create First Plugin - End-to-end plugin starter
- Guide: Mod Manifests - Mod schema and loading lifecycle
- Guide: Testing and CI - Validation workflow by package
- Guide: Publishing - Package publish workflow
- Guide: Gotchas - Known pitfalls and failure modes by subsystem
- Decision Guide: ECS Queries - Query filter and performance choices
- Decision Guide: Scheduler Stages - Stage placement strategy
- Decision Guide: Asset Loading - Load/wait/reload/unload choices
- Decision Guide: Rendering - Batch/pass pipeline decisions
- Contributing - Contribution process and project policies
Policies
- Contributing - Pull request and contribution guidance
- Code of Conduct - Community expectations
- Security - Vulnerability reporting process
- License - MIT license details
Community
- Issues - GitHub Issues
- Discussions - GitHub Discussions
- Contributing - Contribution Guide
Version Information
Current Version: 1.0.0
Clockwork is actively evolving. Core APIs exist and are tested, while some planned modules are still intentionally stubbed.
License
Clockwork is licensed under the MIT License.
Created with care by Kohan Mathers