# xpeto

xpeto is an entity component system runtime for real time 2d games and simple applications, written in go.

$ go get kamjapowered.com/xpeto

v0.1.0 · mit · go 1.27

## about xpeto

xpeto, pronounced eks-PE-to, takes its name from xp and espeto. an espeto is a handful of sardines run through a cane skewer and grilled over olive wood, in a boat full of sand, on a beach in málaga.

### ecs at the core

entity component system (ecs) is a paradigm for organising simulation state. an entity is an identifier, a component is a plain struct attached to it, and a system runs over every entity holding a given set of components. behaviour is composed by adding components instead of by extending a class.

### everything is a package

in xpeto, everything above the core is a package. a package groups systems under a label and declares which packages it must run after. rendering, audio, input, assets and networking are packages the game registers itself.

### backend powered

a backend supplies the window, the frame clock and the draw calls. xpeto ships ebiten, which opens a real window and draws to it, and headless, which runs the same world without one, for tests and servers.

## a minimal app

the app below registers a backend and two package lists, then runs. the defaults are passed in explicitly rather than assumed.

package main

import (
    "kamjapowered.com/xpeto"
    "kamjapowered.com/xpeto/backends/ebiten"
)

func main() {
    app := xp.NewApp(ebiten.Backend,
        xp.AppOpt.Pkgs(xp.DefaultPkgs...),
        xp.AppOpt.Pkgs(ebiten.DefaultPkgs...),
    )

    app.Run()
}

[all examples][docs]

## contribute

there are two ways to contribute: building something with xpeto and adding it to the awesome list, or changing the engine through a pull request on github. the api still changes between minor versions.

[awesome][github]