Open-source project
hajimehoshi/ebiten avatar
hajimehoshi/ebiten

Ebitengine: A Go 2D Game Engine That Favors Simplicity Over Abstraction

A dead simple 2D game engine for Go. Ebitengine (v2) A dead simple 2D game engine for Go** Ebitengine (formerly known as Ebiten) is an open source game engine for the Go programming language.

13,484 stars792 forksGoApache-2.0

At a glance

What is it?
Ebitengine is a Go library for building 2D games on desktop, mobile, and web. Its simple API and automatic batching make it a practical choice for small teams, but its Go-only nature and limited console support require careful evaluation.
Who is it for?
Adopt Ebitengine if you are a Go developer building a 2D game for desktop, web, or Android/iOS and you value a minimal API that does not hide the rendering loop. Avoid it if you need a visual editor, a component-entity system, or extensive console support beyond Nintendo Switch and Xbox with Cgo and special negotiations.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Ebitengine Solves and Who It Serves

Ebitengine solves a specific problem: giving Go programmers a way to write 2D games without leaving their language. Most game engines are either C++ behemoths or require scripting languages like Lua or C#. Go developers often end up writing low-level bindings to SDL or OpenGL, which is time-consuming and error-prone. Ebitengine provides a complete API for graphics, input, and audio in pure Go, with a stated goal of being "dead simple." That simplicity targets solo developers and small teams who already know Go and want to ship a game without learning a separate engine ecosystem. It also serves educators and hobbyists who want a gentle entry into game development. The README emphasizes quick development across multiple platforms, which is the core promise: write once, run on Windows, macOS, Linux, FreeBSD, Android, iOS, and WebAssembly.

The Core Mechanism: A Game Loop and Automatic Batching

The engine's architecture is visible in its package structure and API. The main package, ebiten, exposes a Game interface. You implement Update and Draw methods, and the engine calls them each frame. This is the classic game loop pattern, but Ebitengine adds a few modern touches. The README lists automatic batching and an automatic texture atlas as features. That means when you draw many sprites, the engine groups them into fewer draw calls without you having to manage texture pages or render state. The Draw method receives an *ebiten.Image that represents the screen, and you draw onto it using DrawImage or DrawTriangles. The vector package provides functions for drawing shapes like lines and polygons directly. Geometry and color transformations are done with matrices, and custom shaders are supported. The colorm package handles color transformations separately. Offscreen rendering is available by creating an ebiten.Image and drawing onto it, then drawing that image to the screen. This is a straightforward data flow: your code produces images, the engine batches them, and the GPU renders them.

Getting It Running: Commands and Configuration

The README points to installation instructions for each platform, but the basic workflow is standard for Go. You install the library with go get github.com/hajimehoshi/ebiten/v2. Then you write a main package that implements the Game interface. A minimal example from the documentation would define a type with Update and Draw methods, then call ebiten.RunGame in main. For desktops, you need a C compiler for some dependencies, but the README does not detail which ones. For Android and iOS, Cgo is required, and the mobile package helps with build tags. For WebAssembly, you compile with GOOS=js GOARCH=wasm and use the provided shell HTML. The ebitenutil package offers helper functions like RunGameWithOptions and debug drawing. The text/v2 package handles text rendering, and the audio subpackages decode Ogg/Vorbis, MP3, WAV, and PCM. Configuration happens through the RunGameOptions struct, which lets you set window size, title, and whether to use vsync. The cheatsheet on the website is a quick reference for common patterns.

Platform Support and Its Hidden Costs

The README lists eight platforms, but the details reveal trade-offs. Desktop platforms (Windows, macOS, Linux, FreeBSD) are straightforward. Android and iOS require Cgo, which complicates cross-compilation and increases binary size. WebAssembly works without Cgo, which is a plus for web distribution. The console support for Nintendo Switch and Xbox is limited. The README says Xbox support is "not available to everyone" and that negotiations are underway. That means if you plan to ship on consoles, you cannot assume Ebitengine will be accessible. The Cgo requirement on mobile also means you need a working cross-compiler toolchain, which is a common pain point for Go developers. The exp packages for shaderprecomp, textinput, and vmhost are marked as experimental. That is a warning: using them in a production game could break with future releases. The README does not state stability guarantees for these packages.

Limitations: Where Ebitengine Is the Wrong Tool

Ebitengine is not a full game engine. It provides rendering, input, and audio, but it does not include a scene graph, physics, animation, or a level editor. You build those yourself. The README's feature list is deliberately minimal. That means a team expecting a Unity-like workflow will be disappointed. The API is Go-specific, so you cannot use existing C# or Lua game logic. The automatic batching is a benefit, but it also means you have less control over draw order and render passes. If you need advanced 3D, this is not the tool. The engine is strictly 2D, and while custom shaders allow some post-processing, there is no built-in 3D support. The text rendering is basic, and the exp/textinput package suggests that IME support is still experimental. For games that require complex UI, you will likely need to integrate a separate GUI library. The audio support is limited to a few formats; you cannot load OGG Vorbis from a streaming source without managing decoding yourself.

A Real Alternative: Comparing with Raylib

A common alternative for Go game development is raylib, which has Go bindings. Raylib is a C library that provides a similar low-level API for graphics, input, and audio. The difference is in the language and the rendering model. Raylib uses immediate mode rendering, where you call functions like DrawCircle and BeginDrawing each frame. Ebitengine uses retained mode with a Game interface and automatic batching. Raylib gives you more direct control over the GPU state, but you must manage resources manually. Ebitengine handles texture atlas and batching for you, which reduces the chance of performance pitfalls. Raylib has bindings for many languages, so you can switch to C or Python later. Ebitengine is Go-only, so you are locked into Go for the game logic. Raylib also supports 3D, while Ebitengine does not. If you need 3D or want to write game code in another language, raylib is a better fit. If you want a pure Go solution with less boilerplate, Ebitengine is stronger.

Maintenance and License Considerations

The repository shows regular releases: v2.9.8 in January 2026, v2.9.9 in March 2026, and v2.9.10 in August 2026. That indicates active maintenance. The default branch is main, and the project is not archived. The license is Apache-2.0, which is permissive and allows commercial use, modification, and distribution, provided you include the license and notice files. The README notes that the logo is under a separate Creative Commons license, so do not reuse it without attribution. It also bundles third-party libraries, and NOTICE.md lists their licenses. As a user, you must comply with those if you distribute the engine as part of your game. The Apache license does not require you to open-source your game code, which is a benefit for commercial projects. However, if you modify Ebitengine itself and distribute it, you must make those modifications available under Apache-2.0. The maintenance cost for you is low: you update the library via go get, and you may need to adjust to API changes between v2 releases. The exp packages are the risk area, as they may change without notice.

Editorial conclusion

Adopt Ebitengine if you are a Go developer building a 2D game for desktop, web, or Android/iOS and you value a minimal API that does not hide the rendering loop. Avoid it if you need a visual editor, a component-entity system, or extensive console support beyond Nintendo Switch and Xbox with Cgo and special negotiations. Before committing, verify that your target platforms are officially supported, especially if you plan WebAssembly deployment, and check the current state of the exp packages for text input and shader precompilation. Test a small prototype with your exact input and audio needs, because the engine's simplicity means you will write your own scene management and physics.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes