Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ gmts Public

An experimental TypeScript toolchain for GMRT

Notifications You must be signed in to change notification settings

nommiin/gmts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gmts

An experimental TypeScript toolchain for GMRT

About

This project isn't doing anything SUPER fancy at the moment, fundamentally it just makes some non-destructive adjustments to the GMRT build process to slot in a TypeScript compilation step. Fortunately, the GMRT compiler (runtime?) is quite flexible with what files you can pass to it and thus control how your project is built. At the moment, generating a project with gmts will create two files that are needed for TypeScript compilation:

  • 1.) buildgraph.xml (this is created in the root of your project, used to tell gmrt that it needs to invoke tsc prior to building; this file comes from your currently installed GMRT packages)
  • 2.) tsconfig.json (this is also created in the root of your project, used by tsc to know what files to (and not to) compile when the project is built; this is generated at build-time)

Requirements

Usage

As of now, gmts is self-contained... what that means is that you'll need to use gmts --create --name=<project name> and gmts --run [--name=<project name>] to utilize TypeScript features at the moment.

gmts --create will create a blank project with a room named Room1 and a single JavaScript script named main. Inside of <project name>/scripts/main/ exists a main.ts file which you can modify to your liking. Please note that for creation of extra scripts, you must do so within the GameMaker IDE. There shouldn't be any incompatibility with opening the generated YYP, as this is created from your IDE installation itself. (sidenote: gmts --create will create a .gmrecent file which is used by gmts --run if no --name parameter is provided, if you're having problem make sure that the value in .gmrecent actually exists in the /projects/ directory)

gmts functionality itself relies heavily on the paths in gmconfig.json being correct, it mostly infers based off the system username... but it may not be 100% accurate for your setup. Please ensure that the branch value is set accordingly (set to -Beta, as in expecting GameMaker-Beta to be installed)

Limitations

  • The GameMaker editor does not (easily) support reading TypeScript files, please note that scripts opened within GameMaker will show the .js output
  • Asset definitions do not exist, the goal is to generate/read them from .yyp
  • Generated type definitions are soon to come, the included .d.js file from GMRT doesn't seem to play nicely with real TS
  • JavaScript support for GMRT is not finalized, and this extends out to TypeScript (which is NOT currently supported by GMRT at all). Given that this project is an experiment, please do not expect any long term support. This may blossom into something bigger/better, for now this is just to see what's possible with GMRT current day (2/9/2026 as of writing)

Goals

  • Make this into a drop-in solution for setting up TS with GMRT
  • Create comprehensive typings for all GameMaker functions and for popular extensions (if they exist for GMRT at this point)
  • Make this into something useful, or just wait for YYG to add in actual TS support ,

About

An experimental TypeScript toolchain for GMRT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published