Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,677 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rythe logo banner build analyze License-MIT Discord

Rythe-Engine

Rythe-Engine is a data oriented C++20 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

Getting Started

Prerequisites

The engine is by default build using Visual Studio 17 (2022) using Clang-cl and C++20. For linux we don't provide any default IDE support. However, you can still compile the engine using Clang++.

Install

To generate the gmake, make, or visual studio solution, use premake bundled in the tools folder. For visual studio an example is VisualStudio22-All.bat which can be used. As of now Rythe does not support compilation to DLL. Copy the include folder to your project and link the libraries you compiled.

Setup

Rythe already defines the C++ entry point in it's own source code. So in order to start making a program define RYTHE_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 Rythe. Rythe 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
    }
};

Rythe 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

Releases

Packages

Used by

Contributors

Languages