$ show IppClub/Dora-SSR
Dora SSR is a production-grade cross-platform game engine designed for rapid development directly on target devices (mobile, desktop, web). The engine is a monolithic C++ core that provides 2D/3D rendering (bgfx), physics (JoltPhysics, PlayRho, Box2D), audio (SoLoud, libopenmpt), animation (Spine, DragonBones), UI (Yoga layout), and a full scene graph. It exposes scripting via multiple languages: Lua (with a custom binding generator), TypeScript (compiled to Lua via a vendored tstl fork), WebAssembly (via wasm3), Rust (via FFI), and C# (via P/Invoke). A built-in Web IDE (React/Monaco-based) allows coding and debugging from a browser on the same network. The engine also includes an AI coding agent with memory, skill tools, and preview session management, integrated into the IDE workflow. Over 50 CI workflows build for Android, iOS, Windows, macOS, Linux, and Web (Emscripten).
The LLM identified 3 files worth highlighting for reuse:
A collection of ~100 standalone Lua helper functions that implement JavaScript/TypeScript standard library behaviors (Array.map, Array.filter, Promise, String.trim, Class, etc.) for code compiled from TypeScript by the tstl transpiler. Each file is a single-function module with no internal dependencies, making it trivial to extract and use as a polyfill for any Lua project that needs JS-like array/string/object operations. The pattern demonstrates clean one-function-per-file design and careful handling of Lua differences (e.g., 1-based indexing, mutable tables).
Headers defining C-linkage export functions and a module-linking function for each Dora engine class (e.g., SpriteWasm.hpp, Camera3DWasm.hpp, BodyWasm.hpp). They follow a consistent pattern: extern 'C' DORA_EXPORT functions returning int64_t raw pointers, and a linkXxx(wasm3::module3&) function that calls link_optional for each export. This pattern enables wasm3 to call any engine API from WASM modules. It is reusable for any C++ project needing to expose a large class hierarchy to a WASM runtime with minimal overhead.
Implements a singleton ownership lease for the game preview runtime, preventing concurrent agent operations from corrupting the running state. Uses a simple string-based owner ID, acquire/release methods, and a run counter to predict next run IDs. The pattern is a non-obvious solution to synchronizing LLM-driven code edits with a live preview environment. It could be extracted for any multi-agent or concurrent-edit system that needs to serialize access to a shared runtime.