Installation
This guide will help you set up your development environment for building games with ESEngine.
Quick Start (SDK Only)
For most users, just install the TypeScript SDK:
npm install esengineYou’ll also need the WASM files. Download them from the releases page or build them yourself (see below).
Project Setup
-
Create your project
Terminal window mkdir my-gamecd my-gamenpm init -y -
Install dependencies
Terminal window npm install esenginenpm install -D esbuild typescript -
Create tsconfig.json
{"compilerOptions": {"target": "ES2020","module": "ESNext","moduleResolution": "bundler","strict": true,"esModuleInterop": true},"include": ["src"]} -
Add build scripts to package.json
{"type": "module","scripts": {"build": "esbuild src/main.ts --bundle --format=esm --outfile=build/main.js","dev": "esbuild src/main.ts --bundle --format=esm --outfile=build/main.js --watch"}}
Building WASM (Advanced)
If you need to build the C++ WASM backend yourself:
Prerequisites
| Tool | Version | Purpose |
|---|---|---|
| CMake | 3.16+ | Build system |
| C++ Compiler | C++17 support | GCC 8+, Clang 7+, MSVC 2019+ |
| Emscripten | 3.1+ | WebAssembly compilation |
| Node.js | 18+ | SDK build |
Installing Emscripten
# Clone emsdkgit clone https://github.com/emscripten-core/emsdk.gitcd emsdk
# Install and activate latest version./emsdk install latest./emsdk activate latest
# Add to your shell profileecho 'source "/path/to/emsdk/emsdk_env.sh"' >> ~/.bashrc# Clone emsdkgit clone https://github.com/emscripten-core/emsdk.gitcd emsdk
# Install and activate latest version.\emsdk.bat install latest.\emsdk.bat activate latest
# Activate in current terminal.\emsdk_env.batVerify the installation:
emcc --version# emcc (Emscripten gcc/clang-like replacement) 3.x.xBuilding
-
Clone the repository
Terminal window git clone https://github.com/esengine/microes.gitcd microes -
Build WASM
Terminal window # Web buildemcmake cmake -B build_web -DES_BUILD_WEB=ONcmake --build build_web# WeChat MiniGame buildemcmake cmake -B build_wxgame -DES_BUILD_WXGAME=ONcmake --build build_wxgame -
Build SDK
Terminal window cd sdknpm installnpm run build
CMake Options
| Option | Default | Description |
|---|---|---|
ES_BUILD_WEB | OFF | Build for web browsers |
ES_BUILD_WXGAME | OFF | Build for WeChat MiniGames |
ES_BUILD_TESTS | OFF | Build unit tests |
IDE Setup
Visual Studio Code
Recommended extensions:
- ESLint
- TypeScript
For C++ development:
- C/C++ (Microsoft)
- CMake Tools
Next Steps
Now that you have ESEngine set up, create your first game.