-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start guide
To use Core Engine first you have to decide on set of modules you wish to build your Core with.
This could be any of the standard modules shipped with the engine itself (see: list of standard Core modules), or any of user-defined ones.
In case you haven't built the library yet, see Building page of wiki first.
You can start using Core Engine with just 4 simple steps:
#include <core/CoreConfig.h>
//...
core::CoreConfig cfg;
Provide module factory function to core::CoreConfig::Add()
, or use generic NewModule<T>
(defined in core/ModuleContainer.h
) function which will simply pass all arguments to the module constructor.
Usually you'll be passing already added to the config modules as dependencies to other modules (like InputModule
with EngineModule
below), in case they rely on them. (Why? see: IoC principle)
#include <core/Modules/WindowModule.h>
#include <core/Modules/EngineModule.h>
// #include etc...
cfg.Add(NewModule<SceneModule>);
cfg.Add(NewModule<WindowModule>);
cfg.Add(NewModule<RenderModule>);
cfg.Add(NewModule<InputModule>);
cfg.Add(NewModule<EngineModule, InputModule>);
Yep, as simple as that. CoreConfig
will kindly add all of your modules into your shiny Core
object and return it. Also it will throw a bunch of fatals in case you forgot to resolve any of the dependencies.
core::Core core = cfg.Build();
At this point you have a working Core
object and all that's left for you is to comprehend the boundaries of the universe with it!
Continue reading: Core Engine Architecture
- Introduction
- Config system
- Entity system
- Component system
- Application module
- Engine module
- Input module
- Scene module
- Network module
- Math module
- Transform
- Renderer
- Camera