A dev environment for Defold that transpiles TypeScript into lua using TypeScriptToLua.
Includes britzl's boom, a game framework built on top of Defold.
This template extends tsd-template. Use that one if you prefer a minimal setup.
- Full Lua and Defold API type definitions for TypeScript auto-complete and type checking
- Built-in types for boom
- Eslint config for handling the caveats of TypeScriptToLua and keeping your code correct
yarn lint
ornpm run lint
to run the linteryarn lintfix
ornpm run lintfix
to allow the linter to auto-fix issues
- Handles script, gui_script, and module exports using familiar ES6 export syntax
- Full boilerplate game project ready to transpile and go
- File watcher via
yarn dev
ornpm run dev
to transpile on save - Optionally run
yarn buildO1
ornpm run buildO1
to strip source maps, unfold and propagate constants - Access a library of types for Defold extensions by running
yarn resolve
ornpm run resolve
You will need to have Node.js installed.
- Use
yarn dev
ornpm run dev
to start a watcher that compiles and emits lua and script when you save - Use
yarn build
ornpm run build
to just compile your ts, sans watcher
- Fork this template or use degit to download the template locally
npx degit thinknathan/tsd-template-boom my-game
# or
git clone https://github.com/thinknathan/tsd-template-boom.git my-game
- Initialize
cd my-game
npm install
# or yarn
- Generate
npm run build # Transpile the TypeScript files to lua
# or yarn build
# or
npm run dev # Watch for changes and regenerate files on save
# or yarn dev
- Open
app/game.project
in Defold
- Start making games with TypesScript!
TypeScript ❤️ Defold
MIT
Based on tsd-template (Copyright (c) Justin Walsh (@thejustinwalsh)).
Graphics in the assets
folder are CC0 licensed, from Kenney.