vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::Engine Class Reference

Engine context: owns core state and runs the main loop. More...

#include <engine.h>

Public Member Functions

void setFPSLog (bool enabled=true)
 Log "FPS: N (M ms)" to the console once a second.
void run ()
 Run the main loop, blocking until the window closes or the process is interrupted.
template<typename T, typename... Args>
T & addSystem (SystemStage stage, Args &&... args)
 Create and register a system at the given execution stage.
InputMap & getInput ()
 The action map gameplay reads input through.
HostChrome & getChrome ()
 What an authoring host says about the frame it draws over.
RenderSettings & getRenderSettings ()
 The quality settings this session draws at.
NetSession & getNet ()
 The session this end is playing in, offline until told otherwise.

Detailed Description

Engine context: owns core state and runs the main loop.

Owns the services handed to systems on FrameContext, and the per-stage system pipeline. Stack-constructible, so tests and headless tooling can make their own.

Member Function Documentation

◆ setFPSLog()

void Vkm::Engine::Engine::setFPSLog ( bool enabled = true)
inline

Log "FPS: N (M ms)" to the console once a second.

Parameters
enabledFalse to stop.

◆ addSystem()

template<typename T, typename... Args>
T & Vkm::Engine::Engine::addSystem ( SystemStage stage,
Args &&... args )
inline

Create and register a system at the given execution stage.

Stages run in SystemStage order; within one, in registration order.

Template Parameters
TSystem subclass to create.
ArgsConstructor argument types.
Parameters
stageFrame stage it runs in.
argsForwarded to T's constructor.
Returns
The new system, owned by Engine.

◆ getInput()

InputMap & Vkm::Engine::Engine::getInput ( )
inline

The action map gameplay reads input through.

For the host; systems and behaviors use the frame context.

◆ getChrome()

HostChrome & Vkm::Engine::Engine::getChrome ( )
inline

What an authoring host says about the frame it draws over.

For the host that writes it; systems read it off the frame context.

◆ getRenderSettings()

RenderSettings & Vkm::Engine::Engine::getRenderSettings ( )
inline

The quality settings this session draws at.

The project.json render block, after a player's changes; writable while the game runs.

◆ getNet()

NetSession & Vkm::Engine::Engine::getNet ( )
inline

The session this end is playing in, offline until told otherwise.

A host starts a game through NetSession::host or NetSession::connect; gameplay reaches it through FrameContext.


The documentation for this class was generated from the following file: