A downloadable extension

Buy Now$9.95 USD or more

Quick links: Web demo (JS) · Documentation · GM Marketplace

This extension lets you parse and syntax highlight GML code!
It comes in multiple flavours:

  • GML: Lets you syntax highlight GML code inside GameMaker games!
    Can be used with GMLive, TXR, NSP, or any other GML-like scripting system to syntax highlight user-defined code or snippets for display.
  • JS: Lets you syntax highlight GML snippets on your website(s)!
    Can be configured to match custom functions/scripts specific to a page.
  • Haxe: Lets you parse/syntax highlight GML code for countless other uses
    (read more about what Haxe is if you need)

Note: GMS1 version (GMEZ) does not come with a demo project. You can take a look at GMS2 demo (YYZ) using GMEdit.


Buy Now$9.95 USD or more

In order to download this extension you must purchase it at or above the minimum price of $9.95 USD. You will get access to the following files:

gml_string for GMS1.gmez 16 kB
gml_string for GMS2.yymp 220 kB
gml_string for GMS2.3+.zip 97 kB
gml_string for websites.js 26 kB
gml_string source code (in Haxe).zip 13 kB
gml_string_demo.yyz 133 kB

Download demo

gml_string_demo.zip 1 MB


Log in with itch.io to leave a comment.

When using the JS version for web pages, how do I include the "fnames" file that defines functions etc? There doesn't appear to be a gml_string_api_load equivalent but I'm probably missing something silly.

You’ll want gml_string.API.loadFromString (as per docs)

Hello. I already bought this asset. How can I use it in my wordpress website?

See documentation

Hello, I know almost nothing about web pages, I already have the gml_string.js loaded in wordpress and initialized in the head of the page with a plugin. I tried the example renderToHTML: 


and it works for me, I could see it in the console but I don't really know how to render it inside the page. please help

You might do something like

var codeBoxes = document.querySelectorAll("pre:not(.gml)");
for (var i = 0; i < codeBoxes.length; i++) {
    var codeBox = codeBoxes[i];
    codeBox.innerHTML = gml_string.renderToHTML(codeBox.innerHTML, "gml");

and add some CSS for it

.gmlError { color: red }
.gmlCommentLine, .gmlCommentBlock { color: #008000 }
.gmlKeyword, .gmlCurlyBracket {
	color: #00379B;
	font-weight: bold;
.gmlNumber, .gmlString { color: #00f }
.gmlLocal { color: #748 }
.gmlHeaderMeta, .gmlHeaderName { color: #0078AA }
.gmlScript { color: #808 }
.gmlFunction, .gmlMacro, .gmlVariable, .gmlEnum, .gmlEnumField {
    color: #990000;

or, for websites with dark background:

.gmlError { color: #f0f }
.gmlCommentLine, .gmlCommentBlock { color: #5B995B }
.gmlMacro, .gmlEnum, .gmlEnumField {
    color: #FF8080;
.gmlNumber { color: #FF8080 }
.gmlString { color: #FCF320 }
.gmlKeyword, .gmlCurlyBracket,
.gmlFunction, .gmlScript {
    color: #FFB871;
.gmlLocal { color: #FFF899 }
.gmlVariable { color: #58E55A }
.gmlHeaderMeta { color: #A7B }
.gmlHeaderName { color: #77BB5B }