Gate – An Improved GDScript?
Today we are looking at the newly created Gate programming language. In a manner very similar to Dart and especially TypeScript in their relationship to JavaScript, Gate is that to Godot’s GDScript programming language…

Today we are looking at the newly created Gate programming language. In a manner very similar to Dart and especially TypeScript in their relationship to JavaScript, Gate is that to Godot’s GDScript programming language. It is a high level superset ( AKA, valid GDScript is valid Gate script) of the GDScript language that ultimately compiles down to GDScript .gd files. This is done to add several new high level language features including:
- Type-first declarations
- Null safety
- Structs
- Interfaces, traits and namespaces
- Generics
- Expressions
All while providing roughly comparable performance.
One challenge with Gate is that Godot doesn’t display non recognized file types in the file browser, meaning you will not see Gate files inside of Godot. Therefore I created this simple plugin called gate_importer, add the following 3 files to your addons folder:
plugin.gd
@tool extends EditorPlugin var import_plugin func _enter_tree() -> void: import_plugin = preload("res://addons/gate_importer/gate_importer.gd").new() add_import_plugin(import_plugin) func _exit_tree() -> void: remove_import_plugin(import_plugin) import_plugin = nullplugin.cfg
[plugin] name="Gate File Support" description="Registers .gate files in the FileSystem dock." author="Bob Dole" version="1.0" script="plugin.gd"game_importer.gd
@tool extends EditorImportPlugin func _get_importer_name() -> String: return "custom.gate.importer" func _get_visible_name() -> String: return "Gate File" func _get_recognized_extensions() -> PackedStringArray: return ["gate"] func _get_save_extension() -> String: return "res" func _get_resource_type() -> String: return "Resource" func _get_preset_count() -> int: return 1 func _get_preset_name(preset_index: int) -> String: return "Default" func _get_import_options(path: String, preset_index: int) -> Array[Dictionary]: return [] func _import(source_file: String, save_path: String, options: Dictionary, platform_variants: Array[String], gen_files: Array[String]) -> Error: var resource = Resource.new() var filename = "%s.%s" % [save_path, _get_save_extension()] return ResourceSaver.save(resource, filename)Key Links
Gate Language GitHub Repository
You can learn more about the Gate programming language and what it adds to Godot’s GDScript language in the video below.