dora-ssr Documentation

repository·main·Indexed 19 days ago

https://github.com/ippclub/dora-ssr

Documentation for dora-ssr v0.1.0, a cross-platform game engine enabling a 'live device' workflow with a browser-based Web IDE. This includes detailed design specifications for the Dora Agent database architecture, focusing on the lifecycle management of agent.db, task classification, checkpoint compression using native SQL codecs, and atomic data cleanup patterns.

Tokens
394.2K
Snippets
1.2K
Records
2K
Agent score
67%

What's inside dora-ssr

  1. Overview of Dora SSR features

    main

    Dora SSR is a game development engine designed for fast development across multiple devices (smartphones, handhelds, desktops). It provides a complete toolkit including a Web IDE and an LLM-powered Coding Agent.

    Key capabilities include:

    • Scene Management: Tree-based 2D and 3D scenes with physics, lighting, and animation.
    • Programming Models: Supports multiple languages including Lua (via YueScript and Teal), TypeScript (with TSX), Wa, Rust, and C#.
    • Visual Tools: Built-in Web IDE with specialized editors for particles, physics, visual-script, Spine, tile-maps, and Git; plus a Scratch-like Blockly environment.
    • Data & Logic: ECS module for entity management, asynchronous processing for I/O, SQLite for data management, and Excel synchronization.
    • Multimedia: Support for H.264 video, various audio formats (FLAC, OGG, MP3, WAV) with 3D spatial sound, and Effekseer effects.
    • UI & Layout: CSS Flex layout for adaptive scenes, ImGui for debugging, and vector graphics (SVG) rendering.
  2. Overview of Dora SSR API Categories

    main

    The Dora SSR API is organized into several functional domains to support game development. Key domains include:

    • Basic Functionality: Core engine services like App, View, and Profiler.
    • Asset & Data Management: Handling files, paths, caching, and databases via Content, Path, Cache, DB, and Git.
    • Input Management: Processing keyboard, mouse, and controller input via InputManager (note: tap/touch events are handled via node events).
    • Scene & Tree Management: Managing the game hierarchy using Director, Scheduler, and various Camera types, along with Node and specialized nodes like AlignNode or Menu.
    • Graphics Rendering: 2D rendering (Sprites, Grids, Labels, etc.) and 3D rendering (Node3D, Model3D, Camera3D, etc.).
    • Physics: 2D physics simulation (PhysicsWorld, Body) and 3D physics (PhysicsWorld3D, Body3D).
    • ECS Framework: Entity-Component-System capabilities using Entity, Group, and Observer.
    • Specialized Systems: Includes a Platformer Game Framework, Coroutine Management, Machine Learning (C4.5, Q-learning), Dialogue Systems (YarnRunner), and Networking (HttpClient, HttpServer).
  3. Overview of Miniz features and capabilities

    main

    Miniz provides several compression and archive capabilities:

    • zlib/Deflate Compatibility: Acts as a drop-in replacement for the most commonly used zlib APIs. It is a completely independent implementation, meaning zlib's licensing requirements do not apply.
    • Stream-based Processing: Unlike block-based compressors, Miniz supports stream-based processing using a coroutine-style implementation. The zlib-style API functions can be called one byte at a time.
    • Low-level Codecs: The tdefl (compressor) and tinfl (decompressor) APIs use simple state structs that can be saved/restored via memcpy. These low-level APIs do not use the heap.
    • Archive Management: Includes a set of APIs for reading, writing, and appending .ZIP format archives, designed for embedded, mobile, or game development.
    • Image Support: Contains simple functions for writing .PNG format image files.
    • Performance: Tuned to be comparable to zlib. It includes a specialized real-time compressor designed to compete with fastlz/minilzo.
  4. Overview of ActionEditor Web IDE Development

    main

    The ActionEditor is a visual Web IDE component within the dora-dora toolset designed for editing Dora .model files. It provides a canvas-based interface using WebGL and imgui-ts to manage sprites, animations, keyframes, and look settings.

    Key capabilities include:

    • Model Management: Parsing and serializing .model XML files, including handling malformed files by creating empty models.
    • Visual Editing: A WebGL-powered canvas for sprite manipulation (move, rotate, scale, anchor, size) via gizmos, node tree hierarchy, and property panels.
    • Animation Workflow: A timeline with a 60fps grid, keyframe management (add, delete, copy, paste, move), and playback controls (play, pause, loop, easing).
    • Atlas Packing: Converting .clips input into .clip and .png output files.
    • Integration: Seamlessly integrated into the Web IDE for creating, opening, and saving Dora animation files.
  5. Overview of Dora Game UI Component Library Design

    main

    The Dora Game UI component library is designed to allow developers to rapidly build game interfaces (HUD, menus, inventories, dialogue, etc.) using a React-like dynamic TSX syntax. It leverages AlignNode for Yoga/Flexbox layout and NanoVG-style vector drawing for scalable, low-resource visual performance.

    Key Design Goals:

    • Fast Onboarding: Use TSX composition instead of complex rendering pipelines.
    • Runtime Mutability: Use DoraX signal and createRoot() for dynamic updates (states, lists, progress bars).
    • Reliable Layout: Use AlignNode's style for dimensions, spacing, alignment, and positioning.
    • Lightweight Drawing: Default to calling nvg drawing functions directly in a Node's render callback to avoid excessive off-screen textures.
    • Themable: Visuals are driven by theme tokens, component variants, and painter functions.
    • Full Input Support: Covers touch, mouse, keyboard, and gamepad (hover, pressed, selected, disabled, focused, etc.).
  6. What is Dora SSR?

    main

    Dora SSR (多萝珍奇引擎) is a cross-platform game engine designed for building games directly on the target device (phone, handheld, desktop, etc.).

    It utilizes a unique development flow where the engine runs natively on the device, while developers use a browser-based Web IDE to code, inspect, and iterate against the real-time running engine via a local network connection.

  7. Overview of Dora SSR

    main

    Dora SSR (多萝珍奇引擎) is a cross-platform game engine designed for direct development on target devices. Instead of developing on a PC and deploying to a device, the engine runs on the target hardware (mobile, handheld, desktop, etc.), and developers connect to it via a built-in Web IDE through a browser. This creates a continuous loop of writing, checking, running, and iterating within the actual runtime environment.

    Key Technical Specs:

    • Development Workflow: Target device runs engine + Web IDE + Coding Agent (AI-assisted development).
    • Supported Languages: Lua, TypeScript/TSX (via TSTL), Teal, YueScript, Wa, Rust, C#, and Blockly.
    • Runtime Capabilities: 2D/3D scenes, physics, animation, audio, video, UI, and asynchronous resource workflows.
    • Supported Platforms: Android, Windows, Linux, macOS, iOS, and HarmonyOS.
  8. Overview of UIX MVP Component Scope

    main

    The UIX library (located in Assets/Script/Lib/UIX/) is designed to provide a dynamic TSX-based UI system for game HUDs and interfaces within the Dora engine. The MVP (Minimum Viable Product) focus is on establishing a stable rendering pipeline: AlignNode layout -> PaintNode -> nvg painter -> interaction state.

    Key capabilities include:

    • Dynamic Updates: Integration with DoraX for dynamic roots, signals, and keyed diffing.
    • Layout Engine: Support for align-node.style patching for dynamic layout changes.
    • Rendering: Direct nvg painting via PaintNode without the overhead of automatic VGNode caching for simple components.
  9. Overview of Dora Web IDE features

    main

    The Dora Web IDE provides the following core tools for game development:

    • Resource Tree: A sidebar on the left used to view and organize project files and folders.
    • Code Editor: A central editor supporting syntax highlighting and error reporting for Lua, Teal, TypeScript, and YueScript.
    • Real-Time Preview: Allows for instant viewing of code changes, facilitating rapid debugging and iteration.
  10. Overview of Tiny OpenEXR features

    main

    Tiny OpenEXR is a portable C++ library designed to load and save OpenEXR (.exr) images. It supports various formats and compression types:

    Image Formats

    • OpenEXR v1: Supports Scanline and Tiled formats (with and without LoD).
    • OpenEXR v2: Supports Multi-part images and Deep images (loading scanline + ZIPS + HALF or FLOAT pixel types).

    Compression Support

    • NONE, RLE, ZIP, ZIPS, PIZ.
    • ZFP (via tinyexr extension).

    Other Capabilities

    • Pixel Formats: Supports UINT and FLOAT for loading and saving.
    • Optimization: Supports C++11 thread loading and OpenMP multi-threading for both loading and saving.
    • C Interface: Provides a C interface, making it easy to write language bindings (e.g., for Go or Python).
  11. Overview of UIX Development Milestones

    main

    The UIX (User Interface eXtension) library development is organized into several milestones covering infrastructure, basic layout, controls, game-specific components, and advanced features like overlays and scrolling containers.

    Key milestones include:

    • M1: Infrastructure: theme, context, PaintNode, and drawing primitives.
    • M2: Layout & Visuals: Box, Row, Column, Stack, Spacer, Panel, Text, Icon, and FocusRing.
    • M3: Basic Controls: Button, IconButton, and ProgressBar.
    • M4: Game Components: HealthBar, ResourceCounter, and CooldownButton.
    • M6: Secondary Controls: Toggle, Slider, and Tabs.
    • M8: Overlay Components: Tooltip, ToastStack, and Modal.
    • M10: Inventory Components: ItemSlot and InventoryGrid.
    • M11: Scrolling: ScrollView using nvg scissor clipping.
    • M12: Form Controls: Checkbox.
  12. Overview of the Wa Programming Language

    main

    Wa (Chinese name "凹") is a general-purpose, statically typed programming language designed specifically for WebAssembly (WASM). It aims to provide a simple and reliable experience for high-performance web applications. The language features an independently developed code generator and runtime, meaning it does not depend on external projects like LLVM.

    Key resources: