#graphics #gamedev #game-engine #system #engine #game

baba

Extremely simple library for games, inspired by love2d and raylib

3 unstable releases

0.2.1 Jul 26, 2024
0.2.0 Jul 26, 2024
0.1.0 Jul 20, 2024

#1089 in Game dev

25 downloads per month

Apache-2.0

46KB
1K SLoC

baba

Extremely simple library for game development, inspired by love2d and raylib.

Its main goal is to provide a robust base for games of any complexity. It is currently built on top of SDL2, which already has widespread usage and supports a huge variety of systems.

fn main() -> baba::Result {
    baba::run("My game", MyGame::update)
}

impl MyGame {
    fn update(&mut self) {
        // Update your game logic and draw onto the screen!
        gfx::clear(Color::WHITE);
    }
}

Roadmap?

  • Primitives rendering
    • Public Drawable api
    • Public Canvas api
  • Shape rendering
    • SDL apis? maybe use epaint? both?
  • Text rendering (SDL_ttf)
  • Event alternative to input::is_key_down etc
  • Audio playback (SDL_audio)
  • Config loading, also more engine settings
  • Document all APIs
  • Write the Baba Engine Book

lib.rs:

Baba is an extremely simple engine for game development, inspired by love2d.

Its main goal is to provide a robust base for games of any complexity. It is currently built on top of SDL2, which already has widespread usage and supports a huge variety of systems.

Like SDL, it's entirely free. Baba uses the Apache license, which means usage for any purpose, commercial or not, is allowed.

Getting started

All of the magic happens when you call baba::run, and you can use the library right away!

fn main() -> baba::Result {
    baba::run("My game", MyGame::update)
}

impl MyGame {
    fn update(&mut self) {
        // Update your game logic and draw onto the screen!
        gfx::clear(Color::WHITE);
    }
}

Refer to the modules to see what the engine can do. Baba is still pretty early in development, so loads more documentation are still coming.

Dependencies

~31MB
~555K SLoC