在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Rythe-Interactive/Rythe-Engine开源软件地址:https://github.com/Rythe-Interactive/Rythe-Engine开源编程语言:C++ 77.2%开源软件介绍:Rythe-EngineRythe-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/. FeaturesRendering
Physics
Preview FeatureECS
Eventsystem
Audio
Compute
Misc
CMakeRythe 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
All configurations use C++17 on the x64 architecture. BuildingRythe-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:
CMake projects are built using a command-line interface, or through the GUI. We'll describe the command-line approach here. Note particularly the
Enable/disable optional parameters by adding them to the last command using
You may now either open the project, or build the engine using the CLI:
Adding new modulesWe 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:
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 SetupLegion already defines the C++ entry point in it's own source code. So in order to start making a program define #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 #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)
ContributingPlease 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. LicenseThis project is licensed under the MIT License - see the LICENSE file for details |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论