Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>MGSL – Multi Grid Scripting LanguageNew to Visual Studio Code? Get it now.
MGSL – Multi Grid Scripting Language

MGSL – Multi Grid Scripting Language

Bojan Endrovski

|
1 install
| (0) | Free
Syntax highlighting, diagnostics, tag-value coloring, hover, go-to-definition, and completion for .mgsl files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MGSL – Multi Grid Scripting Language

VS Code support for MGSL, a domain-specific language for procedural grid-based level generation. MGSL programs describe how to transform a stack of correlated grids through pattern-rewrite rules.

Features

Real-time diagnostics

Errors appear as you type — undeclared grids, unknown tag values, shape mismatches, duplicate declarations, and more.

Diagnostics

Tag value coloring

Every tag value gets a stable background color. Pattern bodies light up to show which cells carry which values — the same color you see in the tag declaration appears wherever that value is used.

Tag coloring

Colors automatically adapt to light and dark themes.

Hover information

Hover over any tag value, rule name, or grid name to see its declaration inline — including the full tagset, rule attributes, and pair count.

Go to definition

F12 (or Ctrl+click) on a tag value, rule name, or grid reference jumps to where it is declared.

Completion in pattern bodies

Inside [ … ] pattern cells, Ctrl+Space (or type [ to trigger automatically) offers all tag values declared for that grid, including glyph aliases, plus the wildcards . and ?.

Syntax highlighting

Keywords, pattern wildcards (. and ?), comments, and numeric literals are highlighted via a TextMate grammar.

Language quick reference

tag terrain { wall █, floor · }

layers {
    level: grid of terrain
}

rule fill(symmetry=all) {
    level[?]
    =>
    level[·]
}

program {
    resize(60, 40)
    all fill
}
Token Meaning in pattern
. match any value (including empty)
? match or write the empty cell
name / glyph a specific tag value
integer a numeric value (grid of number)

Getting started

  1. Create a file with the .mgsl extension
  2. Declare tags and layers
  3. Write rules and a program block
  4. Diagnostics appear in the Problems panel as you edit

Resources

  • Language specification
  • Grammar reference
  • Example scripts
  • Issues

Changelog

0.2.0

  • Hover information for tag values, rule names, and grid references
  • Go to definition (F12 / Ctrl+click)
  • Completion inside pattern bodies — tag values, glyphs, and wildcards
  • Coloring scoped to actual tag value references (no false positives on rule/layer names)
  • Error squiggles now land on the correct token (rule name, tag name, etc.)
  • Additional sema checks: inconsistent row widths, reserved glyph aliases

0.1.0

  • Initial release: syntax highlighting, real-time diagnostics, tag-value coloring
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft