Skip to content

karnkaul/bave

Repository files navigation

bave

BAsic Vulkan Engine

Build Status

bave is a simple 2D engine written in C++20 and Vulkan.

Demo

bave-example-android.mp4

Features

  • Desktop / Android support.
  • Efficient event queue.
  • Double buffered render resources.
  • Meshes and textures.
  • Shaders, optional custom descriptor sets (but fixed layout).
  • Drawable API.
  • Fonts and text.
  • Multi touch support.
  • Audio playback.
  • Streaming audio (music).

API Reference

Documentation is located here.

Requirements

Runtime

  • Windows, Linux on X11, or Android targets.
    • MacOS support is experimental, and requires Vulkan SDK (it includes MoltenVK).
    • Wayland is untested and may have some edge cases.
  • Vulkan 1.1+ capable GPU, loader, and driver.
  • C++ runtime.

Build time

  • All runtime requirements, and:
  • C++20 compiler and standard library*.
  • CMake 3.22+.
  • (Optional but highly recommended) Vulkan SDK and/or validation layers.
    • Android validation layers are downloaded by the example, feel free to copy them / the script into your project.
    • bave vendors Vulkan headers and loads functions at runtime, so the SDK / loader is not needed at build time.

*Usage of C++20 library features currently unsupported on Android NDK and MacOS clang (eg std::format, std::ranges, etc) has been avoided throughout bave.

Example

See example for an app that's designed to target Android while being developed on the desktop.

Tools

bave-tools-animator.mp4

bave-tools (desktop only) includes some utilities to edit texture atlases, nine slices, and sprite animations.