Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.18 KB

File metadata and controls

61 lines (41 loc) · 2.18 KB
  1. Download the editor based on your OS and select an JS engine (we recommend v8 for a start) and unzip it
  2. Rename the downloaded file based on your OS:
    • Linux: godot.linuxbsd.editor.x86_64 ➡️ godot
    • MacOS: no rename required
    • Windows: godot.windows.editor.x86_64.exe ➡️ godot.exe
  3. Add Godot to your PATH
    • Linux: /usr/local/bin
    • MacOS: echo ~/your-path/Godot.app/Contents/MacOS|sudo tee /etc/paths.d/godot;bash -l;echo $PATH
    • Windows: setx /M path "%path%;C:\your-path\windows-editor-v8"
  4. Open a terminal
  5. Test if you can use Godot via terminal and run:
godot --version

Note: The Godot.app isn't signed for MacOS you need to allow to open it.

Create a new project

  1. Run godot -p and create a new project
  2. Inside the editor install preset files via Project > Tools > GodotJS > Install Preset files
  3. Click OK to confirm a list of files will be generated in the project.
  4. Run cd <your-project>
  5. Run npm i
  6. Run npx tsc to compile the typescript files

Install Preset Files

Install Presets

Prompt

Create Scripts

To create new scripts, press select GodotJSScript as language:

Select Language

Use the Node: Node.Ts template:

Create a Script

Open the project folder in you IDE, you should see full TypeScript support!

Type Hint

Compile TypeScript Sources

Before your scripts runnable in Godot, run tsc to compile typescript sources into javascript.

npx tsc

# or watch if you want
npx tsc -w

Also, you can simply click the tool button on GodotJS bottom panel in the godot editor. It'll do the same thing for you.

TSC Watch