Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hazzard993/love-typescript-template
A template project to get started with a TypeScript LÖVE 2D project
https://github.com/hazzard993/love-typescript-template
love2d template template-project typescript
Last synced: about 1 month ago
JSON representation
A template project to get started with a TypeScript LÖVE 2D project
- Host: GitHub
- URL: https://github.com/hazzard993/love-typescript-template
- Owner: hazzard993
- License: mit
- Created: 2019-02-19T23:54:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T03:56:46.000Z (2 months ago)
- Last Synced: 2024-10-01T08:03:18.324Z (about 1 month ago)
- Topics: love2d, template, template-project, typescript
- Language: TypeScript
- Homepage:
- Size: 310 KB
- Stars: 36
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LÖVE 2D TypeScript Project Template
A template LÖVE 2D TypeScript Project made possible with [TypeScriptToLua](https://github.com/TypeScriptToLua/TypeScriptToLua).
You can click `Use this template` to clone this repo, or download it as a zip.
## Scripts
Requires [NodeJS](https://nodejs.org/en/download/) and [LÖVE 2D](https://love2d.org/) within your CLI.
| Command | Description |
| ---------------------- | ------------------------------------------------ |
| `npm install` | ⏬ Install dependencies |
| `npm run build` | 🔨 Build everything |
| `npm run watch` | 🔨x♾ Re-build Lua files when a TS file is saved |
| `npm start` | 🎮 Start the game |
| `npm run fix:prettier` | 💄 Fixes linting issues |
| `npm run lint` | 💄 Checks for linting issues in code |To distribute the game, see the [game distribution wiki page](https://love2d.org/wiki/Game_Distribution).
External files can be placed in `res/` and referenced with `res/`.
e.g.
```ts
love.filesystem.read("res/input.txt");
```### Notes
- If you're using VS Code, the [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extension will automatically format your code for you so you don't need to run `npm run fix:prettier` on every change.
- Index your arrays at 0 in your source code.
- Lua does not iterate over sparse arrays (arrays with no values in the middle of them).### Links
- [TypeScriptToLua Wiki](https://github.com/TypeScriptToLua/TypeScriptToLua/wiki)
- [Writing Declarations](https://github.com/TypeScriptToLua/TypeScriptToLua/wiki/Writing-Declarations)
- [Compiler Directives](https://github.com/TypeScriptToLua/TypeScriptToLua/wiki/Compiler-Directives)
- [LÖVE 2D Wiki](https://love2d.org/wiki/Main_Page)
- [LÖVE 2D - Getting Started](https://love2d.org/wiki/Getting_Started)