Bundle and run your TIC-80 ES6 JavaScript carts.
npm i tic80-js --save-dev
-
Create a JavaScript TIC-80 index.js with ES6:
// title: TIC-80 JS Simple Test // author: Rob Loach // desc: Small example of using tic80-js // script: js let t = 0 let x = 96 let y = 24 let world = 'WORLD!' export function TIC() { if (btn(0)) y-- if (btn(1)) y++ if (btn(2)) x-- if (btn(3)) x++ cls(13) spr(1 + ( (t % 60) / 30 | 0) * 2, x, y, 14, 3, 0, 0, 2, 2) print(`HELLO ${world}`, 84, 84) t++ }
-
Create a sprites.gif in the same directory that would be used for the game.
-
Build and run the game through TIC-80 JS:
npx tic80-js index.js
-
To export the cart.tic, press escape to load the console, and use
save
.
There are some examples that are available that give some sense of how TIC-80 JS could be used.
There are a few alternatives to tic80-js: