API Docs for:
Show:

Main Class

Module: gs

Controls the boot-process of the game.

Methods

createStartScene

() gs.Object_Base

Creates the start scene object. If an intro-scene is set, this method returns the intro-scene. If the game runs in Live-Preview, this method returns the selected scene in editor.

Returns:

gs.Object_Base:

The start-scene.

getSettings

()

Gets game settings.

load

(
  • callback
)

Loads all system resources needed to start the actual game.

Parameters:

  • callback Function
    • Called when all system resources are loaded.

loadData

()

Loads game data.

loadSystemData

()

Loads system data.

loadSystemResources

()

Loads system resources such as graphics, sounds, fonts, etc.

setupApplication

()

Sets up the application.

setupAudioSettings

(
  • settings
)

Sets up audio settings.

Parameters:

  • settings Object
    • Current game settings.

setupEffects

()

Registers shader-based effects. It is important to register all effects before the graphics system is initialized.

setupGameSettings

(
  • settings
)

Sets up game settings.

Parameters:

  • settings Object
    • Current game settings.

setupInput

()

Initializes the input system to enable support for keyboard, mouse, touch, etc.

setupLive2D

()

Initializes the Live2D. If Live2D is not available, it does nothing. Needs to be called before using Live2D.

setupLive2D

() Function

Creates the frame-callback function called once per frame to update and render the game.

Returns:

Function:

The frame-callback function.

setupSettings

()

Sets up settings.

setupVideo

()

Initializes the video system with the game's resolution. It is necessary to call this method before using graphic object such as bitmaps, sprites, etc.

setupVideoSettings

(
  • settings
)

Sets up video settings.

Parameters:

  • settings Object
    • Current game settings.

start

()

Boots the game by setting up the application window as well as the video, audio and input system.

updateFrame

()

Updates the current frame.