Crate baba

Source
Expand description

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.

Modules§

gfx
Rendering and resource loading
input
Input handling.
math
Common math operations.
prelude
Common functions and objects used by baba programs.

Structs§

Game
Tells the engine how to run a game.
SdlError
Internal SDL error. This usually means something in backend went wrong.
Settings
Global engine settings.
WindowSettings
Window settings.

Enums§

Error
Common errors from the library.
Framerate
Framerate limit.

Functions§

game
Entrypoint function for baba games.
run
Simple entrypoint function for baba games.

Type Aliases§

Result
A Result type for baba programs.