Which components does a engine consists of?
Each engine has subsystems, which are responsible for an specific functionality. Some of these components depend on other components. Some might be optional, while others are required.
- File IO
- User Interface/Input
What about Layers?
Modern game engines are divided into layers. The first(deepest) layer of an engine is the platform independence layer, which identify the running platform and wraps the low-level platform specific components to be abstract (Network, Rendering, File IO, User Input).
The next higher layer is sometimes called core-layer, because here are things like memory management, initialization, datatypes, mathematical algorithms, testing/logging,
And the next layer is the game-layer, where the game specific things can be found. (animation, collision, scripting, physics, GUI)
Engine components = entity components?
It seems logical that an object in the game world should be divided in components that match the game engines components. So the first step is to declare these components:
- RenderComponent (Animation, Picture)
- UserInteractionComponent (Click, Mouseover, Key pressed…)
- PhysicComponent(Shape, Weight, Static/Dynamic)
- AudioComponent(Musik, Sounds)
- LightComponent(Shape, Color, Intensity)
- ScriptComponent(Apply GameLogic)
As you see not for all game engine components a equivalent is needed. The abstraction here is much higher than in the game engine subsystems. This is because we find ourselves in the game-specific-layer. The view from the GameObjects (Entitys).
The most components should be clear, but why is persistence there? So that is a part of my first design decision. This design decision will be about how an entity is stored and why the component-based architecture is not the jack of all trades. See ya!