tic80-js
Bundle your TIC-80 carts with ES6 JavaScript
Last updated 4 months ago by robloach .
MIT · Original npm · Tarball · package.json
$ cnpm install tic80-js 
SYNC missed versions from official npm registry.

TIC-80 JS

Bundle and run your TIC-80 ES6 JavaScript carts.

Installation

npm i tic80-js --save

Usage

  1. 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++
    }
    
  2. Create a sprites.gif in the same directory that would be used for the game.

  3. Build and run the game through TIC-80 JS:

    tic80-js index.js
    
  4. To export the cart.tic, press escape to load the console, and use save.

Current Tags

  • 0.0.1                                ...           latest (4 months ago)

1 Versions

  • 0.0.1                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |