Skip to content

API-first ECS game engine with a deterministic tick loop and WebGL rendering.

License

Notifications You must be signed in to change notification settings

Quiet-Terminal-Interactive/Clockwork

Clockwork

Clockwork is a TypeScript-first, modular game engine workspace focused on ECS-driven runtime systems and a WebGL2 renderer stack.

Current Scope

Implemented in this repository:

  • Core runtime packages: ECS, scheduler, events, serialization, assets, audio, app/plugin runtime
  • WebGL2 renderer packages: qti-clockwork-gl, qti-clockwork-shaders, qti-clockwork-materials, qti-clockwork-passes
  • Platform integration package: qti-clockwork-tauri-bridge
  • Web shell app: qti-clockwork-tauri-shell-web

Planned but not fully implemented yet:

  • Fixed-point determinism math module
  • Full physics plugin
  • Full particle simulation plugin

Monorepo Layout

engine/
  core/
    app/
    assets/
    audio/
    ecs/
    events/
    input/
    scheduler/
    serialization/
  renderer-webgl2/
    gl/
    materials/
    passes/
    shaders/
  platform/
    tauri-bridge/
apps/
  tauri-shell/
    web/
  examples/

Prerequisites

  • Node.js 22
  • corepack enabled
  • pnpm 10.x (workspace is pinned to pnpm@10.6.3)

Quick Start

corepack enable
corepack pnpm install
corepack pnpm dev

The dev command runs the web shell in apps/tauri-shell/web.

Common Commands

Run from repository root:

corepack pnpm lint
corepack pnpm typecheck
corepack pnpm test
corepack pnpm build
corepack pnpm format
corepack pnpm format:check

Run one package:

corepack pnpm --filter qti-clockwork-ecs test
corepack pnpm --filter qti-clockwork-ecs build
corepack pnpm --filter qti-clockwork-tauri-shell-web dev

Minimal API 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()

CI

GitHub Actions runs:

  • lint
  • typecheck
  • test
  • build

Workflow file: .github/workflows/ci.yml

Publishing

Publish engine packages from repo root:

corepack pnpm -r --filter "./engine/**" publish --access public --no-git-checks

Token-based auth (npm):

export NPM_TOKEN="..."
printf "//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n" > .npmrc

Do not commit .npmrc.

Docs

  • CONTRIBUTING.md: contribution workflow
  • CODE_OF_CONDUCT.md: community expectations
  • SECURITY.md: vulnerability reporting process

About

API-first ECS game engine with a deterministic tick loop and WebGL rendering.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages