Code Monkey home page Code Monkey logo

tic80-js's Introduction

TIC-80 JS

Bundle and run your TIC-80 ES6 JavaScript carts.

Installation

npm i tic80-js --save-dev

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:

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

Examples

There are some examples that are available that give some sense of how TIC-80 JS could be used.

Other Solutions

There are a few alternatives to tic80-js:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.