How hajimehoshi/ebiten works
Project type and purpose
• Ebitengine is an open-source, cross-platform 2D game engine library for Go.
• It provides a simple API for game developers to build and deploy 2D games on desktop (Windows, macOS, Linux, FreeBSD), web (WebAssembly), mobile (Android, iOS), and consoles (Nintendo Switch, Xbox).
File structure
• Top-level packages:
• audio/ (decoding, context, playback)
• ebitenutil/, inpututil/, colorm/, vector/, text/ (utility libraries)
• mobile/, cmd/ebitenmobile (mobile platform bindings)
• examples/ (client code exercising the API)
• internal/ (platform abstraction layers and drivers)
• internal/graphicsdriver/ holds multiple backends: DirectX, Metal, OpenGL, console drivers.
• internal/ui/ wraps window creation, event loop, input dispatch per platform.
• internal/gamepad/, internal/vibrate/, internal/file/ isolate platform specifics.
• Build and CI config under .github/ and .builds/.
README for additional insights
• Confirms supported features: 2D graphics (shaders, composition, offscreen), input (mouse, keyboard, gamepad, touch), audio (MP3, Vorbis, WAV).
• Mentions external dependencies (GLFW, go-gl/gl) and that Cgo is optional.