Skip to content

Introduction

ESEngine is a lightweight 2D game engine with a TypeScript SDK powered by a C++/WebAssembly backend. Build games that run in web browsers and WeChat MiniGames with excellent performance.

Why ESEngine?

TypeScript-First Development

Write your game logic in TypeScript with a modern, type-safe ECS API:

import { createWebApp, defineSystem, Schedule, Commands, Query, Res, Time, LocalTransform, Sprite } from 'esengine';
const app = createWebApp(Module);
app.addSystemToSchedule(Schedule.Update, defineSystem(
[Res(Time), Query(LocalTransform, Sprite)],
(time, query) => {
for (const [entity, transform, sprite] of query) {
transform.position.x = Math.sin(time.elapsed) * 100;
}
}
));
app.run();

High Performance C++ Backend

The rendering and core ECS are implemented in C++ and compiled to WebAssembly:

  • Small binary size - Optimized for fast initial load times
  • Native performance - C++ rendering pipeline
  • Type-safe bridge - TypeScript types match C++ components

WeChat MiniGame Support

First-class support for WeChat MiniGames platform:

  • Optimized touch input handling
  • WeChat-specific APIs (share, ad, payment)
  • Tested on real devices

When to Use ESEngine

ESEngine is ideal for:

  • 2D games targeting web browsers
  • WeChat MiniGames
  • Projects requiring small download sizes
  • TypeScript developers wanting ECS architecture

ESEngine may not be the best choice for:

  • 3D games (2D only)
  • Desktop-only games (use a native engine)

Architecture Overview

┌─────────────────────────────────────────────────────┐
│ Your Game (TypeScript) │
│ Systems │ Components │ Queries │ Resources │
├─────────────────────────────────────────────────────┤
│ ESEngine SDK │
│ App │ World │ Commands │ defineSystem │
├─────────────────────────────────────────────────────┤
│ C++ WASM Backend │
│ Registry │ Renderer │ Input │ ResourceManager │
├─────────────────────────────────────────────────────┤
│ Emscripten / WebGL │
└─────────────────────────────────────────────────────┘

Next Steps

Ready to get started?

  1. Install the prerequisites
  2. Create your first game
  3. Learn about ECS