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
- Host: GitHub
- URL: https://github.com/karnkaul/bave
- Owner: karnkaul
- License: mit
- Created: 2023-12-11T13:16:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-06T04:50:45.000Z (over 1 year ago)
- Last Synced: 2025-06-14T17:06:03.348Z (10 months ago)
- Topics: 2d-game-engine, android, cpp, cpp20, game-engine, vulkan
- Language: C++
- Homepage:
- Size: 13.4 MB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bave
**BAsic Vulkan Engine**
[](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.