Class Game

Derive this class for your game application.

class Game ;

Overview

Game Loop

Flow chart of a Teraflop game loop

Constructors

NameDescription
this (name, clearColor) Instantiate a new Game.

Fields

NameTypeDescription
clearColor const(Color)Default value for the color this Game's Windows' framebuffers should be cleared to when rendered.
mainWindow WindowThis Game's primary Window.
world WorldThis Game's primary World.

Properties

NameTypeDescription
active[get] boolWhether the Game is active, i.e. is open and running.
desiredFrameRateHertz[get] intTarget frame rate of the Game, in hertz.
frameRateLimited[get] boolWhether the Game's framerate is being limited.
name[get] stringName of the Game.

Methods

NameDescription
add (system) Add a System that operates on resources and Components in the game's World.
add (system) Add a System, dynamically generated from a function, that operates on resources and Components in the game's World.
run () Run the game.
simpleSubmission (window, cmdBufs) Build a graphics pipeline submission for the simplest cases with a single submission.
exit () Stop the game loop and exit the Game.
initializeWorld (world) Called when the Game should initialize its World.