All Projects → Rythe-Interactive → Legion-Engine

Rythe-Interactive / Legion-Engine

Licence: MIT license
Rythe is a data-oriented C++17 game engine built to make optimal use of modern hardware.

Programming Languages

C++
36643 projects - #6 most used programming language
tcl
693 projects
c
50402 projects - #5 most used programming language
lua
6591 projects
GLSL
2045 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Legion-Engine

Specs Physics
nphysics integration for the Specs entity component system
Stars: ✭ 94 (-81.27%)
Mutual labels:  physics, physics-engine, ecs
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+691.04%)
Mutual labels:  rendering, rendering-engine, 3d-graphics
Limonengine
3D FPS game engine with full dynamic lighting and shadows
Stars: ✭ 331 (-34.06%)
Mutual labels:  physics, 3d-graphics, 3d-engine
Overload
3D Game engine with editor
Stars: ✭ 335 (-33.27%)
Mutual labels:  rendering-engine, 3d-graphics, 3d-engine
Tinyraycaster
486 lines of C++: old-school FPS in a weekend
Stars: ✭ 1,383 (+175.5%)
Mutual labels:  rendering, rendering-engine, 3d-graphics
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (-1.59%)
Mutual labels:  rendering, rendering-engine, 3d-graphics
D3D12Renderer
Custom renderer and physics engine written from scratch in C++/Direct3D 12.
Stars: ✭ 17 (-96.61%)
Mutual labels:  rendering, physics, 3d-graphics
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+313.75%)
Mutual labels:  rendering, rendering-engine, 3d-graphics
Physics3d
A 3D physics engine
Stars: ✭ 101 (-79.88%)
Mutual labels:  rendering, physics, physics-engine
Helixjs
A Javascript 3D game engine.
Stars: ✭ 84 (-83.27%)
Mutual labels:  rendering, physics, 3d-engine
Tinyrenderer
A brief computer graphics / rendering course
Stars: ✭ 11,776 (+2245.82%)
Mutual labels:  rendering, rendering-engine, 3d-graphics
3D interactive graphics rendering engine
Develop a 3D interactive graphics rendering engine
Stars: ✭ 31 (-93.82%)
Mutual labels:  physics-engine, rendering-engine, 3d-graphics
keikan
An elegant (imo) rendering engine written in Rust.
Stars: ✭ 55 (-89.04%)
Mutual labels:  rendering-engine, 3d-graphics
Simplerenderengine
Small C++14 render engine
Stars: ✭ 253 (-49.6%)
Mutual labels:  rendering, rendering-engine
Photon-v2
A program that takes photographs of a virtual world.
Stars: ✭ 75 (-85.06%)
Mutual labels:  rendering, rendering-engine
C-Raytracer
A CPU raytracer from scratch in C
Stars: ✭ 49 (-90.24%)
Mutual labels:  rendering, rendering-engine
Yave
Yet Another Vulkan Engine
Stars: ✭ 211 (-57.97%)
Mutual labels:  rendering, 3d-graphics
nub
A rendering and interaction Processing library
Stars: ✭ 28 (-94.42%)
Mutual labels:  rendering, 3d-graphics
Real-Time-Rendering-4th-Bibliography-Collection
Real-Time Rendering 4th (RTR4) 参考文献合集典藏 | Collection of <Real-Time Rendering 4th (RTR4)> Bibliography / Reference
Stars: ✭ 2,806 (+458.96%)
Mutual labels:  rendering, rendering-engine
f3d
Fast and minimalist 3D viewer.
Stars: ✭ 791 (+57.57%)
Mutual labels:  rendering, 3d-graphics

rythe logo banner build analyze License-MIT Discord

Rythe-Engine

Rythe-Engine is a data oriented C++17 game engine built to make optimal use of modern hardware.

Rythe's core is built on an async compute minded design to take care of the logic and an ECS to take care of the data. This allows the engine, its other modules, and the editor to utilize all the power they can find and to be extremely modular.

The engine's modules are separated into optional git submodules; links to them can be found in their respective folders in rythe/engine/.

Features

Rendering

  • Post-processing stack
  • Particle system
  • PBR
  • Imgui
  • Automatic exposure
  • Modular rendering pipeline
  • Custom shader support & shader standard library
  • shader precompiler lgnspre
  • GLTF & OBJ support

Physics

  • Convex quick hull generation
  • Diviner physics engine

Preview Feature

  • Dynamic Destruction Demo

ECS

  • Data oriented
  • Thread-safe
  • "Archetype" support

Eventsystem

  • Thread-safe eventbus
  • Unique & Persistent events
  • easy extensebility

Audio

  • Spatial audio
  • Non-spatial audio
  • Dopplereffect
  • MP3 & WAV support
  • Stereo->Mono conversion

Compute

  • OpenCL frontend with support for buffers & textures
  • High level abstractions

Misc

  • Virtual filesystem
  • Serialization & Scenes(Alpha)
  • Job scheduling
  • Pipeline scheduling for multiple main threads
  • Modular Processchains
  • Custom logging support
  • Custom input system
  • Extended standard library
  • Modular Architecture
  • Math extensions to GLM

CMake

Rythe uses CMake to generate its project files. The CMake script recognizes git submodules and adds configurable options to enable/disable them in the cache.

Using this system, you can easily generate a project with the modules that you need. Adding new modules is also simple and requires no CMake modification, see the Adding new modules section for more.

Supported configurations

Platform Compiler
Windows 10+ LLVM-Clang
Ubuntu 20.04 Clang++

All configurations use C++17 on the x64 architecture.

Building

Rythe-Engine uses CMake 3.16, make sure to install a CMake version that is the same or higher (https://cmake.org/install/).

If you haven't yet cloned the repository, start with that:

cd repositories/
git clone https://github.com/Rythe-Interactive/Rythe-Engine.git

CMake projects are built using a command-line interface, or through the GUI. We'll describe the command-line approach here. Note particularly the -T ClangCL parameter; this is to select the LLVM Clang toolchain in Visual Studio.

cd repositories
cmake -E make_directory Rythe-Engine-Build
cmake . 
    -G "Visual Studio 16 2019" 
    -S Rythe-Engine/ 
    -B Rythe-Engine-Build/
    -T ClangCL

Enable/disable optional parameters by adding them to the last command using -D<PARAMETER_NAME>=ON Optional parameters to add to the last command are:

Paarameter Description
RYTHE_BUILD_APPLICATIONS Add applications to the project files. The engine provides a sandbox application in the root repository, but modules may also provide their own (sandbox, samples, etc.).
RYTHE_BUILD_OPTION_ASAN Enable the address sanitizer. Can be useful/important for debugging memory violations.
RYTHE_FORCE_ENABLE_ALL_MODULES Forcefully enable every available module. This is mostly used for CI reasons but you may use this for convenience as well.
RYTHE_MODULE_<NAME> If enabled, the module with the given name (the parameter is uppercase, the module lowercase), will be added to the build.

You may now either open the project, or build the engine using the CLI:

cmake --build Rythe-Engine-Build/ --config Debug

Adding new modules

We recommend using the module template to create new modules, but it is also possible to set up the cmake scripts manually - if you wish to do so, refer to the build system API documentation for expected cmake scripts, and the usage patterns of helper functions.

To add a new module: Create a new repository using the instructions on the repository template at https://github.com/Rythe-Interactive/Rythe-Module-Template.

Assuming you have previously cloned Rythe-Engine, go to its root folder and add the git submodule the following commmand:

git submodule add <link> rythe/engine/<name>

This modifies two things; the gitmodules file and a separate commit hash file. Make sure to commit/push these changes to the branch of your choice.

After having added the git submodule, simply configure CMake with RYTHE_MODULE_<NAME>=ON, or with the checkbox checked in the CMake GUI as discussed in the building section.

Setup

Legion already defines the C++ entry point in it's own source code. So in order to start making a program define LEGION_ENTRY and include any of modules main include files. eg:

#define LEGION_ENTRY
#include <core/core.hpp>

Since the entry point is already defined you need to define a different function to start working with Legion. Legion will already start itself, but it won't have any modules attached. In order to attach modules you need to define the reportModules function like so:

#include "mymodule.hpp"
using namespace legion;

void LEGION_CCONV reportModules(Engine* engine)
{
    engine->reportModule<MyModule>();
    engine->reportModule<app::ApplicationModule>();
}

Of course in order to link your own modules you need to make one:

#include <core/core.hpp>
#include "mysystem.hpp"

class TestModule : public legion::Module
{
public:
    virtual void setup() override
    {
        reportComponentType<my_component>(); // Report a component type
        reportSystem<MySystem>(); // Report a system
    }
};

Legion engine uses an ECS for all of it's core functionality. So for your own project you need to define your own systems and components:

#include <core/core.hpp>

struct my_component { int myVal; };

class MySystem final : public legion::System<MySystem>
{
    virtual void setup()
    {
        createProcess<&MySystem::update>("Update");
    }
    
    void update(legion::time::span deltaTime)
    {
        // Do stuff every frame on the update thread
        static auto myQuery = createQuery<my_component, position>();
        mQuery.queryEntities();
        for(auto entity : myQuery)
        {
            // Runs for every entity that has both my_component and a position component.
        }
    }
};

For more information about the engine usage see the docs.

Dependencies

(All libraries can already be found in the deps folder)

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].