ebitenutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugPrint

func DebugPrint(r *ebiten.Image, str string) error

func NewImageFromFile

func NewImageFromFile(path string, filter ebiten.Filter) (*ebiten.Image, image.Image, error)

NewImageFromFile loads the file path and returns ebiten.Image and image.Image.

func RecordScreenAsGIF

func RecordScreenAsGIF(update func(*ebiten.Image) error, out io.Writer, frameNum int) func(*ebiten.Image) error

RecordScreenAsGIF returns updating function with recording the screen as an animation GIF image.

This encodes each screen at each frame and may slows the application.

Here is the example to record initial 120 frames of your game:

func update(screen *ebiten.Image) error {
    // ...
}

func main() {
    out, err := os.Create("output.gif")
    if err != nil {
        log.Fatal(err)
    }
    defer out.Close()

    update := RecordScreenAsGIF(update, out, 120)
    if err := ebiten.Run(update, 320, 240, 2, "Your game's title"); err != nil {
        log.Fatal(err)
    }
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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