Skip to content

ialex32x/GodotJS

Repository files navigation

GodotJS

Add TypeScript/JavaScript Support for Godot 4.x with v8.

Build Godot Editor Windows with GodotJS Build Godot Editor MacOS with GodotJS

Note

This project is still in the very early stage of development.

Features

  • Godot ScriptLanguage integration
  • Debug with Chrome devtools when using V8
  • REPL in Editor
  • Hot-reloading
  • Asynchronous module loading (import function)
  • Sandboxed scripting (not multi-threading)
  • Worker threads

Get Started

STEP 1: Download or clone the repo into the modules directory of your Godot engine source:

cd YourGodotEngineSource/modules
git clone https://github.com/ialex32x/GodotJS.git

STEP 2: Pull all lfs objects (since the prebuilt v8 library is too big to push as a common file on github):

Note

git-lfs must be installed as a prerequisite. Follow the instructions on Github Docs to install git-lfs.

cd YourGodotEngineSource/modules/GodotJS
git lfs install
git lfs pull

STEP 3: Compile and launch Godot Editor. Then, install TypeScript/JavaScript presets into a Godot project.

For more information on how to use GodotJS in a project, check out GodotJSExample for examples written in typescript.

A prebuilt version of Godot Editor can be downloaded from GodotJS-Build.

Example: Snake Example: Jummpy Bird

Scripting

Utilities

Advanced

Supported Platforms

  • Windows: x86_64
  • Windows: ARM64, UWP
  • MacOS: AppleSilicon
  • Android
  • iOS
  • Linux
  • WebAssembly (quickjs only)