Dagor Engine
repository·main·Indexed 25 days ago
https://github.com/gaijinentertainment/dagorengineA high-performance game engine toolkit providing tools for building game code, shaders, and assets. It includes daScript development utilities such as dasfmt for source code formatting, dastest for unit testing and benchmarking, benchctl for persisting and comparing benchmark results via SQLite, and dascov for measuring code coverage.
What's inside Dagor Engine
- pugixml is a C++ XML processing library that provides a DOM-like interface with rich traversal and modification capabilities. It features an extremely fast XML parser that constructs a DOM tree from files or buffers, and includes an XPath 1.0 implementation for complex data-driven tree queries. The library also provides full Unicode support, including automatic conversions between different Unicode encodings during parsing and saving.
Overview of Quirrel scripting language
mainQuirrel is a fast, high-level imperative scripting language designed for real-time applications like games. It is optimized for low size and memory bandwidth requirements. It features a C/Java/C++-like syntax combined with a dynamic nature similar to Python, Lua, or JavaScript.
Key features include:
- Dynamic typing and higher-order functions
- Generators and coroutines
- Tail recursion and exception handling
- Automatic memory management
- Modules with hot reload support
- Static code analysis
Quirrel is designed to be safer and stricter than Lua or JavaScript while maintaining performance comparable to Lua.
Overview of the `rendinst_layered` shader family
mainThe
rendinst_layeredshader family provides several specialized shaders for layered material rendering:rendinst_layered: The foundational shader.dynamic_layered: An optimized version for dynamic objects (destrs).rendinst_layered_atest: Supports alpha testing for one or both detail textures.rendinst_layered_lightmap: The standard shader with added support for emissive maps.rendinst_layered_hmap_blend: Includes heightmap blending for terrain transitions and clipmap projection.
Overview of benchctl
mainbenchctl is a command-line tool for storing, querying, and comparing daslang benchmark results across different commits. It uses a local SQLite database to persist benchmark data and provides statistical comparisons (using Welch's t-test) between two sets of results. It is designed to integrate with the
dastestbenchmark runner.Key Capabilities:
- Insert benchmark JSON output files into a persistent database.
- Tag results with Git commit hashes or custom labels.
- Query the database using structured filters (
--commit,--tag). - Compare two sets of results and compute geometric mean deltas.
- Analyze data directly using a SQLite3 client.
Overview of mini_chromium
mainmini_chromium is a small, self-contained library consisting of low-level ("base") routines extracted from the Chromium open-source project. It is designed to allow other projects to use Chromium's base routines in a standalone environment without requiring the full Chromium dependency tree.
Key characteristics:
- Interface Compatibility: Provides the same interface as the equivalent code in Chromium.
- Strict Subset: The interfaces exposed by mini_chromium are a strict subset of Chromium's base library.
- Modified Implementations: While many implementations are identical to Chromium's, some are modified to eliminate unwanted dependencies or are completely distinct to maintain the library's self-contained nature.
Overview of Open Asset Import Library (assimp)
mainAssimp is a library designed to import and export various 3D model formats. It loads files into a shared, in-memory format and provides mesh post-processing tools to generate missing render data.
Key features include:
- Format Support: Imports over 40 file formats and supports a growing selection of export formats.
- Post-Processing: Includes tools for normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, and merging redundant materials.
- Language Support: Provides native APIs for C and C++, with various bindings for C#, Java, Python, Delphi, and D. It also runs on Android and iOS.
Overview of Sqrat
mainSqrat is a C++ binding utility designed for thequirrellanguage. It facilitates the creation of bindings between C++ andquirrel.Overview of the rendinst_interior_mapping shader
mainTherendinst_interior_mappingshader simulates interiors for large or numerous windows by projecting an interior cubemap onto a plane or box. It creates the illusion of an interior space "behind the glass" using a drawn cubemap. Reflections on the glass are simulated using either a custom-made cubemap or an environment cubemap generated upon map loading.Overview of Procedural Rendinst Painting types
mainProcedural painting in Dagor Engine is implemented differently depending on the project type.
War Thunder-based projects:
- Procedural texture painting: Uses texture-based procedural methods.
- Painting the second detail: Uses the
rendinst_layeredshader via the editor (Note: This method is now deprecated).
daNetGame-based projects:
- Procedural texture painting: Uses texture-based procedural methods.
- Procedural parameter-based painting: Uses shader parameters to drive painting effects.
Overview of daslang Test Explorer features
mainThe daslang Test Explorer integrates the
dastestframework with the native VSCode Test Explorer UI.Key Capabilities:
- Discovery: Automatically finds functions annotated with
[test]or[benchmark]in.dasfiles. - Execution Profiles: Supports Run All, Run Tests Only, and Run Benchmarks Only.
- Granularity: Run individual tests, entire files, or all tests.
- Feedback: Shows benchmark timing stats in the sidebar and provides clickable source locations for failed tests.
- Sync: Uses a file watcher to keep the test tree updated as you edit files.
- Discovery: Automatically finds functions annotated with
Overview of Dagor Engine features and capabilities
mainDagor Engine is a high-performance game engine developed by Gaijin, designed for realistic graphics and large-scale environments. It supports multiple graphics APIs including DirectX 12, Vulkan, and Metal.
Key technical components include:
- daGI (Dagor Global Illumination): Optimized global illumination for large dynamic scenes with raytracing support.
- daRG (Dagor Reactive GUI): A reactive UI framework based on Quirrel scripting, supporting stateful components.
- Dagor ECS: A data-driven Entity Component System for modular development using templates and parallel processing.
- daFrameGraph: A directed acyclic graph system for defining frame rendering sequences.
- daNetGame Framework: A modular platform integrating rendering, physics, networking, and audio.
- Daslang: A scripting language used to interact with core systems and extend engine functionality.
- DSHL (Dagor Shader Language): A specialized language for advanced shader creation.
- Networking: A low-latency architecture supporting TCP and UDP with built-in lag compensation and compression.
- Audio: Integration with the FMOD library for 3D sound and DSP effects.
Overview of HarfBuzz text shaping library
mainHarfBuzz is a text shaping library. It is used to convert a sequence of Unicode characters into a sequence of glyph indices and positions, which are then used to render text.
For detailed information, bug reports, and mailing lists, visit the official website: http://harfbuzz.org/
For API documentation, visit: https://harfbuzz.github.io