agentleFS
bmcszkbmcszk/agent-skills/skills/ebiten/SKILL.md

ebiten

Skill1 starsChanged 2 months agoMITView on GitHub

Ebitengine (Ebiten v2) 2D game development in Go. Game loop, input, rendering, ECS, physics, audio, deployment.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use ebiten.SetTPS(ebiten.SyncWithFPS) to decouple update from render.

    line 165
  2. Very specific:

    Use SubImage() for sprite sheet regions (zero-copy)

    line 177
  3. Very specific:

    Use ebiten.NewImage() for off-screen buffers

    line 178
  4. Distinctive:

    Use this skill only when the task clearly matches the scope described above.

    line 210
  5. Distinctive:

    Do not treat the output as a substitute for environment-specific validation, testing, or expert review.

    line 211
  6. Distinctive:

    Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

    line 212

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ebitengine (Ebiten v2)

Go 2D game engine skill — covers the full Ebitengine API and ecosystem. Routes to sub-skills by domain.

Ebitengine is a dead simple 2D game library for Go. Cross-platform: desktop (Windows/macOS/Linux), mobile (iOS/Android), WebAssembly, and Nintendo Switch.

Import: github.com/hajimehoshi/ebiten/v2


When to Use This Skill

You are building a 2D game or interactive graphical application in Go using Ebitengine (Ebiten v2).


Sub-Skill Routing

If you need...Use Sub-Skill
Game loop, ebiten.Game interface, TPS/FPS, window configebiten/game-loop
Keyboard, mouse, gamepad, touch inputebiten/input
Images, sprites, tiles, camera, shaders, textebiten/rendering
Entity Component System (Donburi, Ark, etc.)ebiten/ecs
Collision detection, physics, pathfindingebiten/physics
Sound effects, music, audio playbackebiten/audio
WASM, mobile, Steam, cross-platform buildebiten/deployment
Asset loading, tilemaps (LDtk, Tiled), resource managementebiten/resources

Minimal Game Template

package main

import (
	"log"

	"github.com/hajimehoshi/ebiten/v2"
)

type Game struct{}

func (g *Game) Update() error {
	return nil
}

func (g *Game) Draw(screen *ebiten.Image) {
}

func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) {
	return 320, 240
}

func main() {
	ebiten.SetWindowSize(640, 480)
	ebiten.SetWindowTitle("Title")
	if err := ebiten.RunGame(&Game{}); err != nil {
		log.Fatal(err)
	}
}

Ecosystem Libraries

Architecture

LibraryPurposeStars
donburiECS for Ebitengine500+
arkArchetype-based ECS400+
mizuECS framework400+
ebiten-extendedGodot-inspired scene graph, camera, sprites100+

GUI

LibraryPurpose
ebitenuiFull widget library (buttons, lists, combo boxes)
furexFlexbox-based UI framework
etkToolkit for graphical interfaces

Graphics & Animation

LibraryPurpose
ganim8Animation library inspired by anim8
asepriteAseprite file parser (layers, tags, slices)
aseplayerAseprite animation player
etxtFont management and text rendering
colorgradColor scales for data viz and games
tetra3d3D software renderer via Ebitengine

Physics & Collision

LibraryPurpose
resolv2D collision detection and resolution
cpChipmunk2D physics port
box2d-goBox2D v3 physics port
coll2D collision detection

World & Maps

LibraryPurpose
ldtkgoLDtk level designer loader
go-tiledTiled map editor (TMX) parser
dngnRandom map generation
pathsA* pathfinding

Input

LibraryPurpose
ebitengine-inputGodot-inspired action input system

Audio

LibraryPurpose
resoundSound effects (delay, low-pass, panning, distortion)
xmXM music format playback

Resources & Tools

LibraryPurpose
ebitengine-resourceResource manager
gdataCross-platform gamedata storage
kameraCamera with shake, lerp, zoom

Networking

LibraryPurpose
necsNetworking layer for Donburi ECS

Integration

LibraryPurpose
go-steamworksSteamworks SDK binding

Key Concepts

TPS vs FPS

  • TPS (Ticks Per Second): How often Update() is called. Default: 60. Set via ebiten.SetTPS().
  • FPS (Frames Per Second): How often Draw() is called. Tied to monitor refresh rate.
  • ebiten.CurrentTPS() / ebiten.CurrentFPS() for monitoring.
  • Use ebiten.SetTPS(ebiten.SyncWithFPS) to decouple update from render.

Coordinate System

  • Origin (0,0) is top-left
  • X increases right, Y increases down
  • Layout() defines logical screen size; engine scales to window

Image Model

  • ebiten.Image is the core drawing surface
  • screen parameter in Draw() is the final render target
  • Use SubImage() for sprite sheet regions (zero-copy)
  • Use ebiten.NewImage() for off-screen buffers

Anti-Patterns

Don'tDo
Call ebiten.NewImage() in Update()/Draw()Create images once in NewGame() or load phase
Use floating-point for pixel positionsUse float64 with GeoM (engine handles sub-pixel)
Load assets in Draw()Load in init() or dedicated load phase
Ignore Layout() return valuesReturn consistent logical size
Use ebiten.IsKeyPressed() for single actionsUse inpututil.IsKeyJustPressed() for one-shot triggers
Create *ebiten.DrawImageOptions each frameReuse and reset with opts.GeoM.Reset()
Mix game state with rendering logicKeep Update() pure logic, Draw() pure rendering

References


Remember: Ebitengine is intentionally simple. Start with the Game interface, add libraries only when needed.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.