What is Bullseye2D?
Bullseye2D is a 2D game library for the Dart Programming Language. It provides a simple and straightforward API with high-performance rendering. Games built with Bullseye2D compile to web browsers (WebGL2) and desktop (Windows, Mac, Linux via SDL3) from a single codebase without code changes.
Disclaimer: This is still an alpha version of Bullseye2D.
I might introduce breaking API changes in the future.
Learn more about Bullseye2D on our Homepage
Supported Platforms
| Platform | Renderer | Audio | Status |
|---|---|---|---|
| Web (Chrome, Firefox, Safari) | WebGL2 | Web Audio API | Beta |
| Windows | SDL3 (D3D12/Vulkan/OpenGL) | SDL3_mixer | Beta |
| macOS | SDL3 (Metal/Vulkan/OpenGL) | SDL3_mixer | Beta |
| Linux | SDL3 (Vulkan/OpenGL) | SDL3_mixer | Beta |
Installation
1. Install Dart SDK
Ensure you have the Dart SDK (>= 3.7.2) installed:
2. Install the Bullseye2D CLI
# webdev is requried to run the builds in the browser
dart pub global activate webdev
dart pub global activate bullseye2d
3. Create a project
bullseye2d create ./my_game
cd ./my_game
4. Run your game
# Run development server, test on the browser
bullseye2d run web
# Run the SDL3 Desktop Build
bullseye2d run sdl3
5. Build for distribution
# Build for web
bullseye2d build web
# Build SDL3 executable
bullseye2d build sdl3
Desktop: SDL3
SDL3 builds use SDL3 for rendering, audio, and input. The required SDL3 shared libraries (SDL3, SDL3_image, SDL3_mixer, SDL3_ttf) are included in the repository -- no manual setup required.
bullseye2d run sdl3automatically configures library paths for developmentbullseye2d build sdl3bundles the libraries alongside the compiled executable
Examples
git clone git@github.com:bullseye2d/bullseye2d.git
cd bullseye2d/example
dart pub get
bullseye2d run web
bullseye2d run sdl3
You can also enjoy the demos on our website.
Source code: example
Learning
Bullseye2D comes with comprehensive documentation. Read it online or serve it locally:
bullseye2d docs --serve
Third-Party Licenses
See LICENSE for the full text of all licenses, including third-party dependencies.