Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 2.01 KB

README.md

File metadata and controls

42 lines (29 loc) · 2.01 KB

LÖVE 2D TypeScript Project Template

A template LÖVE 2D TypeScript Project made possible with TypeScriptToLua.

You can click Use this template to clone this repo, or download it as a zip.

Scripts

Requires NodeJS and LÖVE 2D 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.

External files can be placed in res/ and referenced with res/<filename>.

e.g.

love.filesystem.read("res/input.txt");

Notes

  • If you're using VS Code, the Prettier 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