ScaffScript is a minimal superset of GML (GameMaker Language) that adds a TypeScript-like module system. Write organized, modular GML in .scaff files. ScaffScript compiles to GML and can inject it directly into your GameMaker project. Check out the official documentation for more information.
This extension provides language support for .scaff files inside Visual Studio Code.
DISCLAIMER: ScaffScript is not affiliated with or endorsed by YoYo Games Ltd. GameMaker and GML are trademarks of YoYo Games Ltd. This is an independent community effort.
Full syntax highlighting for .scaff (ScaffScript) files, covering:
-
Module system keywords
export,import,include,intg,from,to,as,export ... from. -
GML & control flow keywords
if,else,for,while,return,switch,try,catch, and more. -
Storage types
var,let,const,function,class,interface,enum,type,extends. -
Content directives
@content,@valueof,@typeof,@nameof,@use, and inline aliases (@:name). -
Integration blocks
#[blockName],#[blockName as EventType],#[EventType:EventSubtype Event], flags after--. -
Classes, interfaces, enums, and types, with proper scope colorization.
-
Strings
Double-quoted, single-quoted, template literals (
`), GML template strings ($"..."), and raw strings (@"..."). -
Comments
//line comments and/* */block comments.
Additional editor niceties:
- Command palette to run
scaff generate. - Auto-closing pairs for
{},[],(),"",'', and``. - Bracket matching and surrounding pairs.
- Smart indentation rules.
- Open VS Code.
- Go to the Extensions panel (
Ctrl+Shift+X/Cmd+Shift+X). - Search for ScaffScript.
- Click Install.
- Download the
.vsixfile from the Releases page. - In VS Code, open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P). - Run Extensions: Install from VSIX….
- Select the downloaded
.vsixfile.
Once installed, any file with a .scaff extension will automatically be recognized as ScaffScript and syntax highlighting will activate.
Here's a quick taste of what ScaffScript looks like:
// src/index.scaff
intg { main } to "./scripts/Libraries/MyLib"
import * from "./utils"
#[main]
include { helper } from "./helpers"
@content helper
export function myLib_get(key) {
return helper(key);
}For a full guide on the ScaffScript language itself, check out the official documentation.
-
Syntax highlighting only
There's no IntelliSense, code completion, hover info, go-to-definition, or error diagnostics yet. This extension is purely a grammar/language definition for now.
-
Regex-based parser
ScaffScript's compiler uses a regex-based parser (not an AST), so nested code blocks (e.g. nested struct literals in
@usedirectives) and some edge cases may not parse correctly. -
GameMaker 2.3+ only
ScaffScript is designed and tested for GameMaker 2.3+. It may or may not work with GameMaker 1.x.
-
Early development
ScaffScript API is subject to change without notice. Use at your own risk.
Found a bug or want to request a feature? Open an issue on the GitHub repository.
When reporting a bug, please include:
- Your VS Code version.
- The extension version.
- A minimal code snippet that reproduces the issue.
- A screenshot or description of what you expected vs what happened.


