builder Folder
Folders Index
| folder | gameObject |
| folder | spawnSystem |
Files Index
| file | helios/engine/builder/_module.ixx |
|
Module aggregation for helios.engine.builder. More... | |
Description
helios::engine::builder
Fluent builder pattern implementation for constructing game entities in the helios engine.
Overview
This module provides a declarative, composable API for creating GameObject instances with their associated components. The builder pattern enables clean, readable entity construction while abstracting the complexity of component dependencies and initialization order.
Key Classes
| Class | Purpose |
|---|---|
| GameObjectFactory | Entry point for creating and cloning GameObjects |
| GameObjectPrototype | Fluent builder for configuring entity components |
Submodules
gameObject/
The main factory and prototype classes for GameObject construction.
gameObject/builders/
Domain-specific builders for different aspects of entity configuration:
| Builder | Purpose |
|---|---|
| MotionBuilder | Movement and steering configuration |
| RenderingBuilder | Visual representation setup |
| SceneBuilder | Scene graph integration |
| CollisionBuilder | Collision detection configuration |
| TransformBuilder | Spatial transform setup |
| UiTransformBuilder | UI/viewport-relative transform setup |
| EffectsBuilder | Visual effects (spin, etc.) |
| SpawnBuilder | Spawn system integration |
| AiBuilder | AI behavior configuration |
| CombatBuilder | Weapon and projectile setup |
| LifecycleBuilder | Entity lifecycle (active/inactive) |
| HealthBuilder | Health and damage configuration |
| ScoringBuilder | Score tracking configuration |
| ObserverBuilder | Data binding and observation |
gameObject/builders/configs/
Fine-grained configuration classes used by builders:
| Config | Purpose |
|---|---|
| Move2DConfig | 2D movement parameters |
| SteeringConfig | Rotation and steering behavior |
| MeshRenderableConfig | Mesh, material, and shader setup |
| TextRenderableConfig | Text rendering setup |
| SceneNodeConfig | Scene graph parenting and inheritance |
| TransformConfig | Scale and translation |
| UiTransformConfig | UI/viewport-relative positioning |
| CollisionConfig | Collision layers and responses |
| LevelBoundsCollisionConfig | Arena boundary behavior |
| GfxEffectsConfig | Visual effects parameters |
| SpawnConfig | Spawn profile integration |
| ChaseConfig | AI chase behavior |
| WeaponConfig | Weapon fire rate and projectiles |
| CombatConfig | Combat system configuration |
| LifecycleConfig | Entity lifecycle settings |
| HealthConfig | Health and max health values |
| ScoreValueConfig | Score value on defeat |
| ScorePoolConfig | Score pool binding |
| ObserverConfig | Data observation/binding |
Usage
Creating a New GameObject
Cloning an Existing GameObject
Architecture
Design Principles
The builder module follows these principles:
1. Fluent Interface: Method chaining for readable configuration. 2. Callback-Based Configuration: Builders are configured via lambdas, allowing scoped access. 3. Automatic Dependencies: Configs automatically add required dependent components. 4. Separation of Concerns: Each builder focuses on a single domain (motion, rendering, etc.). 5. Cloning Support: GameObjectFactory::from() creates new entities based on existing templates.
Related Modules
| Module | Purpose |
|---|---|
| helios.engine.ecs | GameObject, Component base classes |
| helios.engine.modules | Component implementations used by configs |
| helios.engine.mechanics | Gameplay-specific components |
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.