An open API service indexing awesome lists of open source software.

https://github.com/karnkaul/bave

BAsic Vulkan Engine for desktop and Android
https://github.com/karnkaul/bave

2d-game-engine android cpp cpp20 game-engine vulkan

Last synced: 28 days ago
JSON representation

BAsic Vulkan Engine for desktop and Android

Awesome Lists containing this project

README

          

# bave

**BAsic Vulkan Engine**

[![Build Status](https://github.com/karnkaul/bave/actions/workflows/ci.yml/badge.svg)](https://github.com/karnkaul/bave/actions/workflows/ci.yml)

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

## Demo

https://github.com/karnkaul/bave/assets/16272243/86539229-0640-42c5-baac-ca74eb382158

## Features

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

## API Reference

Documentation is located [here](https://karnkaul.github.io/bave-docs/).

## 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](example) for an app that's designed to target Android while being developed on the desktop.

## Tools

https://github.com/karnkaul/bave/assets/16272243/58a515b6-c6f0-40da-b433-f753bba38a29

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