Fyrox Game Engine

repository·master·Indexed 27 days ago

https://github.com/fyroxengine/fyrox

A modern, general-purpose 2D and 3D game engine written in Rust. Fyrox provides a production-ready environment including a scene editor (FyroxEd) and a suite of standalone libraries: fyrox-animation for reflection-based animation, fyrox-sound for spatial audio with HRTF support, fyrox-ui for GAPI-agnostic user interfaces, fyrox-autotile for grid-based tile placement, and fyrox-core for linear algebra and algorithms.

Tokens
16.1K
Snippets
15
Records
137
Agent score
94%

What's inside Fyrox

  1. Overview of fyrox-autotile algorithms

    master

    The fyrox-autotile crate provides two primary algorithms for automating tile placement on regular grids (including square, hexagonal, or 3D grids):

    1. Interactive Terrain-based Autotiling: Designed for tile map editing. Users select a broad 'terrain' category for a cell, and the algorithm automatically selects the specific tile that fits naturally with its neighbors. This is based on the terrain-autotiler library.
    2. Wave Function Collapse (WFC): Designed for randomized tile generation. It uses randomization to generate creative tile layouts, potentially replacing manual artist work. This is based on the fast-wfc library.
  2. Overview of fyrox-sound

    master

    fyrox-sound is a Rust-based sound library designed for games and interactive applications. While it carries the fyrox prefix, it is a standalone crate that can be used independently of the Fyrox engine.

    Key Features

    • Sound Sources: Supports both Generic and Spatial sound sources.
    • Streaming: Built-in streaming capabilities for playing large audio files.
    • Format Support:
      • WAV (non-compressed)
      • Vorbis/Ogg (via lewton)
    • Raw Playback: Support for playing raw samples.
    • Audio Effects:
      • HRTF: Head-related transfer function support for binaural effects and precise positioning.
      • Reverb: Built-in reverb effect.
  3. Overview of fyrox-animation

    master

    The fyrox-animation crate provides a flexible, general-purpose, and reflection-based animation system designed for game development.

    Note: Although the crate uses the fyrox prefix, it is a standalone library and can be used in projects without the full fyrox engine.

  4. Overview of fyrox-ui

    master

    fyrox-ui is a retained-mode, general-purpose, and graphics API-agnostic user interface library inspired by WPF. It is designed to be used independently of the fyrox engine.

    Key features include:

    • Over 28 built-in widgets (e.g., Button, Grid, Tree, Window, Inspector).
    • Full TTF/OTF font support.
    • A powerful, flexible layout system.
    • OS-agnosticism: widgets look consistent across different operating systems.
    • GAPI-agnosticism: it does not depend on a specific rendering backend (OpenGL, DirectX, Vulkan, Metal, etc.).
    • Extensibility: full support for user-defined widgets.
  5. Use derive macros from fyrox-core-derive

    master

    The fyrox-core-derive crate provides procedural macros to automatically implement essential Fyrox traits for your custom types. These macros allow your types to participate in the engine's serialization, inspection, and reflection systems.

    Supported derive macros:

    • #[derive(Visit)]: Implements the Visit trait, used for serializing and deserializing data structures.
    • #[derive(Inspect)]: Implements the Inspect trait, allowing your types to be displayed and edited within the Fyrox editor/inspector.
    • #[derive(Reflect)]: Implements the Reflect trait, enabling runtime reflection capabilities for your types.
  6. Understand the FyroxEd editor library

    master

    FyroxEd is a full-featured editor library for the Fyrox engine. Note that this specific package is a library and cannot be run as a standalone executable.

    Its primary purpose is to serve as a base for building editors with static plugins. If you need to run the editor as a standalone application, use the editor-standalone component instead.

  7. Use fyrox-core for linear algebra and algorithms

    master
    The fyrox-core crate is a shared library that provides linear algebra primitives and various useful algorithms. While it is part of the Fyrox engine ecosystem, it is designed to be used as a standalone crate in any Rust project without requiring the full engine.
  8. Integrate fyrox-ui rendering into your application

    master

    Because fyrox-ui is OS- and GAPI-agnostic, it cannot create native OS windows or render directly to the screen. Instead, it manages an internal draw buffer containing a list of commands.

    To display the UI, you must implement a UI renderer in your application that interprets these commands and executes the corresponding drawing operations using your chosen graphics API (e.g., Vulkan, OpenGL).

  9. FyroxEd Editor Controls

    master

    Use the following keyboard and mouse controls to navigate and interact with the FyroxEd editor:

    Navigation & Selection

    • Click: Select objects
    • W, S, A, D: Move camera
    • Space: Raise camera
    • Q / E: Lower camera

    Interaction Modes

    • 1: Select interaction mode
    • 2: Move interaction mode
    • 3: Scale interaction mode
    • 4: Rotate interaction mode

    Editing

    • Ctrl + Z: Undo
    • Ctrl + Y: Redo