Close full mode

Quick Start

githubEdit on Github
Last update: a minute ago by Justin WalshReading time: 2 min


  1. Install NodeJS (LTS recommended).
  2. Install the Defold Editor.
These commands may require root privileges, depending on your operating system and configuration.

Quick Start

  1. Create a new ts-defold project:

    npm init @ts-defold my-indie-hit

    The wizard will guide you through the project configuration

  2. Open the project in your favorite editor

    code ./my-indie-hit
    Visual Studio Code is highly recommended. The template projects come pre-configured with vscode settings and extension recommendations.
  3. Start the development server

    npm run dev

    The development server will start a file watcher and TSTL compiler to incrementally compile your changes on save.

  4. Open the project in the Defold Editor (installing defold)

    /Applications/ ./app/game.project
    # or
    # or
    ~/Defold/Defold ./app/game.project

    The template game project is located at: ./app/game.project.

Project Directory Structure

├─ .eslintrc # Eslint configured to handle the caveats of TSTL & ts-defold
├─ package.json # NPM package dependencies and metadata
├─ tsconfig.json # TypeScript compiler configuration for TSTL & ts-defold
├─ app/ # The Defold game project
│ ├─ lualib_bundle.lua # TypeScript support library
│ ├─ modules/ # Transpiled shared lua modules
│ ├─ scripts/ # Transpiled Defold game scripts (lua)
├─ src/ # TypeScript src files [edit these]
│ ├─ modules/ # Shared modules
│ ├─ scripts/ # Defold game scripts
TypeScript ❤️ Defold
Next — 🚀 Getting Started
Project Generator