VISU - PHP Game Framework

QuickstartOptions
in package

Table of Contents

Properties

$appClass  : string
Application class The class that is being constructed as the quickstart app instance.
$container  : Container|null
A prexisting instance of a service container, if none is given a new one will be created.
$draw  : null|callable(QuickstartApp, RenderContext, RenderTarget): void
Draw the scene. (You most definetly want to use this)
$drawAutoRenderVectorGraphics  : bool
Should the app automatically initalize and render a vector graphics frame in the draw call?
$gameLoopMaxUpdatesPerFrame  : int
The maximum amount of updates that can be executed, before a render call is forced.
$gameLoopTickRate  : float
The targeted amount of game update ticks per second of the game loop.
$initializeScene  : null|callable(QuickstartApp): void
A callable in which the scene entities and components should initalized
$ready  : null|callable(QuickstartApp): void
A callable that is invoked once the app is ready to run.
$render  : null|callable(QuickstartApp, RenderContext, RenderTargetResource): void
A callable that is called once per frame to configure the rendering pipeline This is where you can attach render passes, use if you need higher / complex control over the rendering pipeline.
$update  : null|callable(QuickstartApp): void
A callable that is invoked to update the game state.
$windowHeadless  : bool
Should the app window be headless? (Offscreen rendering)
$windowHeight  : int
The app windows height.
$windowTitle  : string
The app windows title.
$windowVsync  : bool
Should the app window have vsync enabled?
$windowWidth  : int
The app windows width.

Properties

$appClass

Application class The class that is being constructed as the quickstart app instance.

public string $appClass = \VISU\Quickstart\QuickstartApp::class

This NEEDS to be a subclass of QuickstartApp.

$container

A prexisting instance of a service container, if none is given a new one will be created.

public Container|null $container = null

$draw

Draw the scene. (You most definetly want to use this)

public null|callable(QuickstartApp, RenderContext, RenderTarget): void $draw = null

A callable that is called once per frame to draw your scene. This call we be wrapped in a render pass of the pipeline build in render.

$drawAutoRenderVectorGraphics

Should the app automatically initalize and render a vector graphics frame in the draw call?

public bool $drawAutoRenderVectorGraphics = true

$gameLoopMaxUpdatesPerFrame

The maximum amount of updates that can be executed, before a render call is forced.

public int $gameLoopMaxUpdatesPerFrame = 10

$gameLoopTickRate

The targeted amount of game update ticks per second of the game loop.

public float $gameLoopTickRate = 60.0

$initializeScene

A callable in which the scene entities and components should initalized

public null|callable(QuickstartApp): void $initializeScene = null

This is called once after the ready stage as registered all binded systems. So the general flow is as:

  • ready = bind systems
  • initializeScene = setup entities & components

$ready

A callable that is invoked once the app is ready to run.

public null|callable(QuickstartApp): void $ready = null

Here you can prepare your game state, register services, callbacks etc.

$update

A callable that is invoked to update the game state.

public null|callable(QuickstartApp): void $update = null

Note! It is not guranteed that this method is called every frame.

$windowHeadless

Should the app window be headless? (Offscreen rendering)

public bool $windowHeadless = false

$windowTitle

The app windows title.

public string $windowTitle = 'VISU Quickstart'

$windowVsync

Should the app window have vsync enabled?

public bool $windowVsync = true

        
On this page

Search results