bullseye2d 2.0.2 copy "bullseye2d: ^2.0.2" to clipboard
bullseye2d: ^2.0.2 copied to clipboard

A cross-platform 2D game library for Dart that supports a WebGL2 backend as well as native support for Windows, Mac and Linux via SDL3.

What is Bullseye2D? #

pub package License: MIT

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 sdl3 automatically configures library paths for development
  • bullseye2d build sdl3 bundles 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.

1
likes
160
points
174
downloads

Documentation

API reference

Publisher

verified publisherasylumsquare.com

Weekly Downloads

A cross-platform 2D game library for Dart that supports a WebGL2 backend as well as native support for Windows, Mac and Linux via SDL3.

Repository (GitHub)
View/report issues

License

Zlib, MIT (license)

Dependencies

args, ffi, http, path, sdl3, shelf, shelf_static, vector_math, web

More

Packages that depend on bullseye2d