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.
Application & frame loop
groot/appCreate the app, sample frame input, draw, and present.
2D rendering
groot/renderBatched quads, embedded debug text, RGBA8 textures, and camera coordinate conversion.
3D cameras & rendering
groot/render3dCamera matrices and instanced mesh submissions.
Math & color
groot/mathValue types for vectors, matrices, transforms, and RGBA colors.
Entities & physics
groot/ecsPersistent generational entity handles, exact 2D collision helpers, and a spatial hash broadphase.
Native platform bridge
groot/platformLow-level window, input, render-buffer, and texture calls exposed by the host.
Input, time & trace
groot/inputPoll 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 ..
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()
}
}
}