Skip to content

esengine/microes

ESEngine

A lightweight 2D game engine for web and WeChat MiniGames

CI License: MIT Release C++20 Platform

Getting StartedDocumentationDiscordQQ群: 481923584


Overview

ESEngine is a lightweight 2D game engine with a TypeScript SDK powered by a C++/WebAssembly backend. It comes with a visual editor for scene editing and project management, and outputs games that run in web browsers and WeChat MiniGames.

ESEngine Editor

Features

Feature Description
Visual Editor Scene editor with hierarchy, inspector, and asset management
ECS Architecture Data-oriented Entity-Component-System — compose entities from reusable components, drive behavior with systems
WebGL Rendering C++ rendering pipeline compiled to WebAssembly — sprites, cameras, Spine animations, custom shaders
TypeScript SDK Type-safe API with defineSystem, defineComponent, and Query
Cross-Platform Single codebase targeting web browsers and WeChat MiniGames

Getting Started

Install

Download the editor from the releases page and install it.

Create a Project

  1. Open the editor and click New Project
  2. Enter a project name, select a location, and click Create

The editor creates a project with a default scene containing a Camera entity.

Write Game Logic

Add entities and components in the scene editor, then write systems in TypeScript:

import {
    defineComponent, defineSystem, addSystem,
    Query, Mut, Res, Time, LocalTransform
} from 'esengine';

const Speed = defineComponent('Speed', { value: 200 });

addSystem(defineSystem(
    [Res(Time), Query(Mut(LocalTransform), Speed)],
    (time, query) => {
        for (const [entity, transform, speed] of query) {
            transform.position.x += speed.value * time.delta;
        }
    }
));

Press F5 in the editor to preview.

Documentation

Full documentation: esengine.github.io/microes

Contributing

We welcome contributions! Please read the Contributing Guide before submitting a Pull Request.

License

ESEngine is MIT licensed.