Ebitengine
By Ebitengine (Hajime Hoshi and contributors)
Ebitengine, formerly known as Ebiten, is a 2D game development library for the Go programming language that provides a simple game loop, image drawing, input handling, and audio playback for building cross-platform games. It compiles to…
Definition
Ebitengine, formerly known as Ebiten, is a 2D game development library for the Go programming language that provides a simple game loop, image drawing, input handling, and audio playback for building cross-platform games. It compiles to native desktop binaries for Windows, macOS, and Linux, and also targets mobile platforms and WebAssembly for browser-based play. Ebitengine is used by hobbyist and independent developers to build 2D games and interactive graphics applications entirely in Go.
Overview
Ebitengine grew out of a desire to bring a simple, dependency-light 2D game development experience to Go, a language not traditionally associated with game development, at a time when most game developers reached for engines like Unity, Godot, or lower-level libraries in C++ or C#. Its design deliberately mirrors the simplicity of libraries such as Processing or early XNA-style frameworks: a developer implements an `Update` method for game logic and a `Draw` method for rendering, and Ebitengine's runtime calls both at a fixed rate, handling the underlying platform windowing and rendering setup. Mechanically, Ebitengine renders 2D graphics through a hardware-accelerated backend — using OpenGL, Metal, or DirectX depending on platform — while exposing a simple 2D drawing API to the developer, so game code deals only with images, geometric transformations, and draw calls rather than graphics-API-specific code. Its game loop runs `Update` at a fixed tick rate for consistent game logic timing regardless of frame rate, while `Draw` is called once per rendered frame, a separation common in game engine design that decouples simulation speed from display refresh rate. Ebitengine also provides built-in support for keyboard, mouse, touch, and gamepad input, along with an audio package for playing sound effects and music in common formats. Compared with general-purpose game engines like Unity or Godot, Ebitengine is a library rather than an editor-based engine — there is no visual scene editor, and a game's structure is defined entirely in Go code, which suits developers who prefer working in a text editor and version-controlling plain source files over a binary project format. Compared with lower-level graphics libraries, Ebitengine trades fine-grained control over the rendering pipeline for a much simpler, higher-level 2D-focused API that gets a game rendering images and handling input within a small amount of code. In practice, Ebitengine is used for 2D games such as platformers, puzzle games, and retro-style arcade games, and its ability to compile to WebAssembly means a game written once in Go can be distributed as a browser-playable build alongside native desktop binaries without separate porting work. Its small, focused API and the fact that finished games are plain Go binaries with no external engine runtime to install have made it a common choice for game jams and small independent projects. The library's scope is deliberately narrow: Ebitengine does not include a physics engine, scene graph, or asset pipeline the way a full engine like Godot does, so developers typically add their own systems, such as a physics library or tilemap loader, on top of Ebitengine's drawing and input primitives. This keeps the core library small and stable but means larger, more complex games require more manual architecture work than an all-in-one engine would provide out of the box.
Key Features
- Fixed-rate Update and Draw game loop for consistent logic timing
- Hardware-accelerated 2D rendering via OpenGL, Metal, or DirectX
- Built-in keyboard, mouse, touch, and gamepad input handling
- Audio package for sound effects and music playback
- Compiles to native desktop binaries and WebAssembly for browsers
- No external engine runtime required for a compiled game binary
- Library-based workflow with no visual scene editor required