Documentation
¶
Overview ¶
Package piebiten enables running your game using the Ebitengine backend.
Ebitengine is a cross-platform game engine that supports Windows, macOS, Linux, FreeBSD, web browsers, Android, iOS, and even Nintendo Switch.
To launch your game, use Run or RunOrErr.
This package also provides advanced functions for integrating Pi with your own Ebitengine-based game, such as CopyCanvasToEbitenImage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RememberWindow = false
RememberWindow determines whether the game should open at its last window position, size, and monitor when set to true
Functions ¶
func CopyCanvasToEbitenImage ¶
CopyCanvasToEbitenImage copies the canvas to dst using the current palette in pi.Palette and the palette mapping in pi.PaletteMapping.
Types ¶
type Audio ¶ added in v0.32.0
type Audio interface { piaudio.BackendInterface // OnBeforeUpdate must be called at the start of Ebitengine's Update function. OnBeforeUpdate() // OnAfterUpdate must be called at the end of Ebitengine's Update function. OnAfterUpdate() }
func StartAudioBackend ¶ added in v0.32.0
func StartAudioBackend(ctx *ebitenaudio.Context) Audio
StartAudioBackend starts the audio backend with the given Ebitengine audio.Context. Use if you want only piaudio functionality without Pi's graphics.
audio.Context must have a sample rate of 48000.