app

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package app owns the high-level client object that connects configuration, resources, networking, audio, session state, and the active game mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config) (*Game, error)

func NewWithResources added in v0.17.0

func NewWithResources(cfg config.Config, resource *res.Manager) *Game

NewWithResources allows platform launchers to supply a granted asset folder. The game owns resource and closes its archives on Close.

func (*Game) Close added in v0.16.0

func (g *Game) Close()

Close releases resources after the render loop has stopped. Android can start another game in the same process after a surface is recreated.

func (*Game) CompleteScreenshot

func (g *Game) CompleteScreenshot(path string, err error)

func (*Game) ConsumeScreenshotRequest

func (g *Game) ConsumeScreenshotRequest() (string, bool)

func (*Game) Draw

func (g *Game) Draw(screen *render.Frame)

func (*Game) DrawOverlay

func (g *Game) DrawOverlay(screen *render.Frame)

func (*Game) DrawUIOverlay

func (g *Game) DrawUIOverlay(screen *render.Frame)

func (*Game) FrameSubmitted added in v0.7.0

func (g *Game) FrameSubmitted()

func (*Game) HandleGamepadInput added in v0.16.0

func (g *Game) HandleGamepadInput(dt float64) input.GamepadCapture

func (*Game) HandleKeyPress added in v0.13.0

func (g *Game) HandleKeyPress(code input.KeyCode)

func (*Game) InLogin added in v0.17.0

func (g *Game) InLogin() bool

InLogin reports whether platform controls for login may be shown.

func (*Game) InputState

func (g *Game) InputState() *input.State

func (*Game) PrepareKeyInput added in v0.13.0

func (g *Game) PrepareKeyInput(code input.KeyCode, mods gpucontext.Modifiers)

func (*Game) PrepareTextInput added in v0.13.0

func (g *Game) PrepareTextInput(code input.KeyCode) bool

func (*Game) RequestQuit

func (g *Game) RequestQuit()

func (*Game) RequestScreenshot

func (g *Game) RequestScreenshot() (string, error)

func (*Game) Resize

func (g *Game) Resize(width, height int)

func (*Game) RuntimeAnisotropy added in v0.19.0

func (g *Game) RuntimeAnisotropy() int

func (*Game) RuntimeBloom added in v0.19.0

func (g *Game) RuntimeBloom() bool

func (*Game) RuntimeFPS

func (g *Game) RuntimeFPS() bool

func (*Game) RuntimeFullscreen

func (g *Game) RuntimeFullscreen() bool

func (*Game) RuntimeSSAO added in v0.19.0

func (g *Game) RuntimeSSAO() bool

func (*Game) RuntimeSmoothSprites added in v0.19.0

func (g *Game) RuntimeSmoothSprites() bool

func (*Game) RuntimeVSync

func (g *Game) RuntimeVSync() bool

func (*Game) SetQuitFunc

func (g *Game) SetQuitFunc(quit func())

func (*Game) SetUIApp

func (g *Game) SetUIApp(uiApp client.UIApp)

func (*Game) Update

func (g *Game) Update() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL