Skip to content

Getting started ​

There are no prebuilt downloads yet: the release workflow attaches builds to the first tagged version. Until then, build Gamma from source. It takes a while the first time, because vcpkg builds the C++ dependencies.

Build ​

You need:

  • Git, CMake 3.25 or newer, and Ninja
  • A C++20 compiler: MSVC (Visual Studio 2022) on Windows, or a recent GCC or Clang on Linux
  • vcpkg, with VCPKG_ROOT pointing at it
  • Rokit, only if you want StyLua, selene and luau-lsp

On Windows, dev\Setup.bat installs all of these with winget. Run the build commands from a Developer PowerShell so MSVC is on PATH.

On Ubuntu and Debian, install the window system headers SDL3 needs:

sh
sudo apt-get install libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
  libxss-dev libxtst-dev libxkbcommon-dev libwayland-dev wayland-protocols libegl1-mesa-dev libdrm-dev \
  libgbm-dev libibus-1.0-dev libdbus-1-dev libgl1-mesa-dev autoconf autoconf-archive automake libtool libltdl-dev

Then:

sh
git clone https://github.com/TurtolBwoah/Gamma
cd Gamma
cmake --preset debug
cmake --build --preset debug
ctest --preset debug

The executable is build/debug/Gamma. Put it on your PATH, or call it by its path. The rest of the docs write it as Gamma.

Other presets:

PresetWhat you get
debug, releaseThe full engine, with a window and renderer
staticA release build in one file, for Gamma export on Windows
headlessNo window, renderer or SDL3. Can run and test, not play
asanDebug build with sanitizers, Linux only
web, web-threadsEmscripten builds; see AGENTS.md
linux-arm64, linux-arm64-headlessCross builds for a Raspberry Pi

macOS is not built or tested in CI yet.

Your first project ​

sh
Gamma new Hello
Gamma play Hello

Gamma new writes three things:

Hello/
  main.gma     what runs
  assets/      models, images, sounds, fonts
  .luaurc      turns on strict type checking

main.gma prints a line and puts some text in the window:

gama
print("Hello from Gamma")

Surface {
	Target = "Window",
	Padding = 24,
	Parent = Scene,
	Text { Text = "Hello from Gamma", FontSize = 32, Color = $ffffff },
}

Prefer plain Luau? Gamma new Hello --luau writes a main.luau instead. Gama and Luau files can require each other, so you can mix them.

Run it ​

CommandDoes
Gamma play HelloOpens a window and runs until you close it
Gamma run HelloRuns without a window until no script has anything left to do
Gamma play --watch HelloRestarts whenever a file in the project changes
Gamma check HelloType checks the Gama files
Gamma test HelloRuns every *.spec.luau and *.spec.gma file

run and play also take a single .luau or .gma file, or a place file. See the command line reference for every flag.

Editor setup ​

Gama. Install the VS Code extension from Editors/VSCode. It has no build step: copy the folder into your extensions folder. It runs Gamma lsp for errors, completion, hover, rename and the rest, and F5 plays the project. For Neovim, Helix and Zed, use the tree-sitter grammar, which comes with the settings to start Gamma lsp.

Luau. Use luau-lsp with the engine's type definitions:

sh
Gamma definitions .

This writes gamma.d.luau for luau-lsp and gamma.yml for selene. Point luau-lsp.types.definitionFiles at gamma.d.luau, set luau-lsp.platform.type to standard, and put std = "gamma" in selene.toml. The repository's own .vscode/settings.json does exactly this.

The definitions name every member but type most of them any, so you get completion and unknown-member errors, not argument checks. Indexing an instance with an unknown name gives an Instance, since that is how children are looked up.

Next ​

Apache License 2.0