https://github.com/thinknathan/tsd-template-boom
Boilerplate TypeScript template with @ts-defold and @britzl's boom for the game engine Defold.
https://github.com/thinknathan/tsd-template-boom
boom defold defold-engine defold-game-engine gamedev lua template ts-defold ts-defold-template tstl typescript
Last synced: about 1 year ago
JSON representation
Boilerplate TypeScript template with @ts-defold and @britzl's boom for the game engine Defold.
- Host: GitHub
- URL: https://github.com/thinknathan/tsd-template-boom
- Owner: thinknathan
- License: mit
- Created: 2023-06-24T19:08:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T22:26:34.000Z (over 1 year ago)
- Last Synced: 2025-04-20T23:32:34.762Z (about 1 year ago)
- Topics: boom, defold, defold-engine, defold-game-engine, gamedev, lua, template, ts-defold, ts-defold-template, tstl, typescript
- Language: TypeScript
- Homepage: https://ts-defold.dev
- Size: 492 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Defold TypeScript Boom Template
[](https://github.com/thinknathan/tsd-template-boom/actions/workflows/ci.yml)
 
A dev environment for [Defold](https://defold.com/) that transpiles TypeScript into lua using [TypeScriptToLua](https://github.com/TypeScriptToLua/TypeScriptToLua).
Includes britzl's [boom](https://github.com/britzl/boom/), a game framework built on top of [Defold](https://defold.com/).
This template extends [tsd-template](https://github.com/ts-defold/tsd-template). Use that one if you prefer a minimal setup.
## Features
- 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` or `npm run lint` to run the linter
- `yarn lintfix` or `npm 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` or `npm run dev` to transpile on save
- Optionally run `yarn buildO1` or `npm run buildO1` to strip source maps, [unfold and propagate constants](https://github.com/thinknathan/tstl-const-propagation)
- Access a library of types for Defold extensions by running `yarn resolve` or `npm run resolve`
_You will need to have [Node.js](https://nodejs.org) installed._
## Quick Start
- Use `yarn dev` or `npm run dev` to start a watcher that compiles and emits lua and script when you save
- Use `yarn build` or `npm run build` to just compile your ts, sans watcher
## Installation
1. Fork this template or use [degit](https://www.npmjs.com/package/degit) to download the template locally
```bash
npx degit thinknathan/tsd-template-boom my-game
# or
git clone https://github.com/thinknathan/tsd-template-boom.git my-game
```
2. Initialize
```bash
cd my-game
npm install
# or yarn
```
3. Generate
```bash
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
```
4. Open `app/game.project` in Defold
- Start making games with TypesScript!
TypeScript :heart: Defold
## License
MIT
Based on [tsd-template](https://github.com/ts-defold/tsd-template) (Copyright (c) Justin Walsh (@thejustinwalsh)).
Graphics in the `assets` folder are [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) licensed, from [Kenney](https://kenney.nl/assets).