GROOT ENGINE · QUICK REFERENCE

Groot Cheatsheet

Search the engine API, filter by package, and click a signature to copy it. API entries are drawn from the current Ube packages.

PACKAGE

Application & frame loop

groot/app

Create the app, sample frame input, draw, and present.

PACKAGE

2D rendering

groot/render

Batched quads, embedded debug text, RGBA8 textures, and camera coordinate conversion.

PACKAGE

3D cameras & rendering

groot/render3d

Camera matrices and instanced mesh submissions.

PACKAGE

Math & color

groot/math

Value types for vectors, matrices, transforms, and RGBA colors.

PACKAGE

Entities & physics

groot/ecs

Persistent generational entity handles, exact 2D collision helpers, and a spatial hash broadphase.

PACKAGE

Native platform bridge

groot/platform

Low-level window, input, render-buffer, and texture calls exposed by the host.

PACKAGE

Input, time & trace

groot/input

Poll host input, track frame time, and emit diagnostic spans.

START HERE

Minimal game loop

Initialize a project with groot init; configure its window in groot.toml, then build and run with groot start ..

UBE · WASI 0.2
package main

import "github.com/JohnEsleyer/groot/app" as app
import "github.com/JohnEsleyer/groot/color" as color
import "github.com/JohnEsleyer/groot/input" as input

fn main() {
    let mut game = app::app_new_from_manifest()
    game.start()

    while game.is_running {
        game.begin_frame()
        if game.input.is_key_pressed(input::key_escape()) {
            game.stop()
        }
        arena {
            game.draw_rect(120.0, 80.0, 32.0, 32.0, color::green())
            game.present()
        }
    }
}