GMR Documentation

January 7, 2026 ยท View on GitHub

Welcome to the GMR game engine documentation.

Version: 0.1.0

Quick Start

# main.rb - A simple GMR game
include GMR

def init
  @sprite = Sprite.new("assets/player.png")
  @sprite.x = 160
  @sprite.y = 120
end

def update
  if Input.key_down?(:right)
    @sprite.x += 2
  end
end

def draw
  Graphics.clear([20, 20, 40])
  @sprite.draw
end

Documentation

SectionDescription
EngineCore engine modules for game development.
TypesCore data types for positions, vectors, and bounds.
CLICommand-line interface for GMR projects.

Built-in Types

TypeDescription
ColorRGBA color as [r, g, b] or [r, g, b, a], values 0-255. Alpha defaults to 255 if omitted.
KeyCodeKey identifier - integer constant (KEY_*), symbol (:space, :a, :left, etc.), or array of keys to check any match
MouseButtonMouse button identifier - integer constant (MOUSE_*) or symbol

Generated by GMRCli Docs from C++ bindings.