Skip to main content

gameloop Namespace

Definition

namespace helios::engine::runtime::gameloop { ... }

Classes Index

classGameLoop

Central orchestrator for the game update cycle. More...

classPass

Abstract base class for game loop passes. More...

classPassCommitListener

Interface for receiving notifications when a pass reaches its commit point. More...

classPhase

Represents a phase in the game loop containing multiple passes. More...

classTypedPass<StateType>

State-filtered pass that only executes in specific states. More...

Enumerations Index

enum classCommitPoint : uint8_t { ... }

Flags defining synchronization actions at the end of a pass. More...

enum classPhaseType { ... }

Enumeration of game loop phase types. More...

Operators Index

CommitPoint constexproperator& (CommitPoint a, CommitPoint b) noexcept

Bitwise AND operator for CommitPoint flags. More...

CommitPoint constexproperator| (CommitPoint a, CommitPoint b) noexcept

Bitwise OR operator for CommitPoint flags. More...

Enumerations

CommitPoint

enum class helios::engine::runtime::gameloop::CommitPoint : uint8_t
strong

Flags defining synchronization actions at the end of a pass.

Enumeration values
NoneNo commit action (= 0)
PassEventsCommits pass-level events (= 1 << 0)
FlushCommandsFlushes the command buffer (= 1 << 1)
FlushManagersFlushes all registered managers (= 1 << 2)
StructuralFull structural commit (= PassEvents | FlushCommands | FlushManagers)

A CommitPoint specifies what operations should be performed when a pass completes. Multiple flags can be combined using bitwise OR to trigger several actions at once.

Commit points are essential for the deterministic ordering of the game loop:

  • Commands are queued during passes and executed at commit points
  • Pass-level events become readable only after a commit
  • Managers process their queued requests at commit points

Example usage:

See Also

Pass::addCommitPoint()

See Also

GameLoop::passCommit()

Definition at line 35 of file CommitPoint.ixx.

35 enum class CommitPoint : uint8_t {
36
40 None = 0,
41
49 PassEvents = 1 << 0,
50
56 FlushCommands = 1 << 1,
57
64 FlushManagers = 1 << 2,
65
73 };

PhaseType

enum class helios::engine::runtime::gameloop::PhaseType
strong

Enumeration of game loop phase types.

Enumeration values
PrePre-update phase for input and command processing
MainMain update phase for core gameplay systems
PostPost-update phase for cleanup and scene synchronization

The game loop is divided into three sequential phases:

  • Pre: Input processing and command generation.
  • Main: Core gameplay simulation (physics, AI, game logic).
  • Post: Synchronization, cleanup, and preparation for rendering.

Definition at line 40 of file Phase.ixx.

40 enum class PhaseType {
44 Pre,
45
49 Main,
50
54 Post
55 };

Operators

operator&()

CommitPoint constexpr helios::engine::runtime::gameloop::operator& (CommitPoint a, CommitPoint b)
constexpr noexcept

Bitwise AND operator for CommitPoint flags.

Parameters
a

First operand.

b

Second operand.

Returns

The combined flags.

Definition at line 83 of file CommitPoint.ixx.

84 return static_cast<CommitPoint>(std::to_underlying(a) & std::to_underlying(b));
85 }

Reference helios::engine::runtime::registerComponents.

operator|()

CommitPoint constexpr helios::engine::runtime::gameloop::operator| (CommitPoint a, CommitPoint b)
constexpr noexcept

Bitwise OR operator for CommitPoint flags.

Parameters
a

First operand.

b

Second operand.

Returns

The combined flags.

Definition at line 95 of file CommitPoint.ixx.

96 return static_cast<CommitPoint>(std::to_underlying(a) | std::to_underlying(b));
97 }

Reference helios::engine::runtime::registerComponents.


The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.