No description
  • TypeScript 98.1%
  • CSS 1.7%
  • HTML 0.2%
Find a file
2026-05-31 22:23:46 +03:00
.cursor/skills/typescript-engine-unit-testing feat(engine): introduce TypeScript unit testing skill documentation and enhance engine functionality with new command and event buffer systems; add comprehensive tests for world and command management 2026-05-29 15:08:44 +03:00
.vscode Initialize project structure with TypeScript configuration, core game components, and basic entity-component-system architecture 2026-02-28 17:05:46 +03:00
apps/flappy-bird feat(debug): enhance DebugDrawer functionality with keyboard escape toggle and improve debug shell styling; adjust dimensions and transitions for better user experience 2026-05-29 17:41:22 +03:00
packages feat(engine): introduce Scheduler for managing game loop lifecycle; refactor Engine to utilize Scheduler and remove Runtime 2026-05-31 22:23:46 +03:00
plugins/config fix(config): update version to 0.0.6 in package.json; add Resource decorator to ConfigurationResource class 2026-05-25 01:12:16 +03:00
.editorconfig Refactor code structure for improved readability and maintainability 2026-05-07 15:17:14 +03:00
.gitattributes Refactor code structure for improved readability and maintainability 2026-05-07 15:17:14 +03:00
.gitignore chore(engine): update @draug/engine to version 1.0.18 and remove ts-sparse-set dependency; enhance component storage with improved memory management 2026-05-22 02:08:56 +03:00
.yarnrc.yml Refactor code structure for improved readability and maintainability 2026-05-07 15:17:14 +03:00
LICENSE chore(engine): update version to 1.0.24 and change license to Apache-2.0 in package.json 2026-05-29 00:22:14 +03:00
NOTICE chore(engine): update version to 1.0.24 and change license to Apache-2.0 in package.json 2026-05-29 00:22:14 +03:00
package.json feat: add plugins workspace and generate protobuf files 2026-05-18 01:59:11 +03:00
README.md docs(README): expand documentation to introduce Draug Engine, its structure, and usage instructions 2026-05-21 01:13:24 +03:00
tsconfig.json feat: Refactor systems to extend from SystemBase and update metadata handling 2026-05-12 16:16:27 +03:00
yarn.lock chore(engine): update engine version to 1.0.21; add comprehensive tests for plugin system and enhance plugin metadata handling 2026-05-25 01:07:47 +03:00

Draug Engine

This repository contains Draug Engine, a TypeScript game engine focused on clear ECS-based architecture and reusable gameplay building blocks.

The main package is @draug/engine, an ECS-first game engine core built around entities, components, systems, resources, events, commands, and plugins. The goal is to keep the engine small and understandable, while still giving a game enough structure to grow beyond a single update loop full of unrelated logic.

What Is Here

  • packages/engine contains the source for the published @draug/engine package. This is where the ECS core, runtime helpers, event buffers, command queue, and plugin system live.
  • apps/flappy-bird is a small playground application that I use to test the engine in a browser game scenario.
  • plugins contains standard Draug plugins, such as the published @draug/config-plugin. These are reusable pieces of engine functionality that can be installed into a game instead of being copied between projects.

Why This Exists

Draug is not trying to be a full editor-driven engine. It is closer to a lightweight foundation for games written in TypeScript.

I want the engine to make common game code easier to organize: data goes into components, frame logic goes into systems, shared state goes into resources, and optional features can be packaged as plugins. The repository also gives me a place to build small example games while the engine API is still evolving.

Repository Layout

apps/
  flappy-bird/      Example browser game built with the engine

packages/
  engine/           Main @draug/engine package
  types/            Shared helper types

plugins/
  config/           Standard configuration plugin

Using The Packages

The engine is published as an npm package:

npm install @draug/engine

Standard plugins are published separately. For example, the configuration plugin can be installed with:

npm install @draug/config-plugin

Local Development

The repository itself uses Yarn workspaces for developing the engine, plugins, and example app together.

yarn install

To run the Flappy Bird example from this repository:

yarn workspace flappy-bird dev

To build the engine package locally:

yarn workspace @draug/engine build

More Details

The engine package has its own README with a more complete API overview and examples: packages/engine/README.md.

The root README is intentionally short. It is meant to explain what this repository is and where to start, not to document every engine API.