Mix-and-match TypeScript and Lua for your Picotron projects
Go to file Use this template
2025-12-14 17:50:26 +01:00
src First commit 2025-12-14 14:20:25 +01:00
_G.d.ts First commit 2025-12-14 14:20:25 +01:00
.gitignore First commit 2025-12-14 14:20:25 +01:00
game.p64 Update game.p64 2025-12-14 17:50:26 +01:00
package.json First commit 2025-12-14 14:20:25 +01:00
pnpm-lock.yaml First commit 2025-12-14 14:20:25 +01:00
README.md Update README.md 2025-12-14 17:50:08 +01:00
tsconfig.json First commit 2025-12-14 14:20:25 +01:00

TypeScript for Picotron

This is a template project to mix-and-match TypeScript and Lua for your Picotron projects.

Setup

Requirements

Create your project

  • Create a new project (i.e. my-project) from this template
  • Clone my-project in your Picotron's drive folder
  • cd my-project then pnpm install
  • Inside Picotron:
    • Open the terminal, cd my-project then load game
    • Edit main.lua to change the cd line to cd("/my-project/build")
    • Run the game

Development

  • pnpm dev will watch and rebuild your TypeScript code.
  • pnpm build is required when you change Lua code.

The resulting code is a single build/bundle.lua file.

Publish

In Picotron

> cd my-project
> load game
  • Open the code inside Picotron
  • Comment the cd() line in main.lua
  • Save

On the host

pnpm build

In Picotron

Open the terminal:

> cp -f /my-project/build/src /ram/cart/build/src
> save
> export my-project.bin