Skip to content
Javascript implementation of the Pico-8 fantasy console
JavaScript CSS HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

JSGS is an experimental (WIP) javascript implementation of the Pico-8 fantasy console.


What's implemented?

  • Graphics api, font
  • Math api
  • Ram / Ram api
  • Reading cartridges, running lua code

What's missing / Quirks

  • Sound (Help needed)
  • sspr function
  • Cursor
  • stat function
  • Not 100% compatible with Pico-8's Lua flavor.
    • No shorthand assignments
    • all() is not implemented (help needed)

Extra features

  • Multiple screen (canvas) support
  • CRT Filter (optional)
  • On screen / Touch controller (very naìve now)
  • Custom color palette

How to use?

It's not yet packaged to be used by importing into your project. For now, the only way to run your cartridges is manually editing the cartridge url in src/index.js file. For cloning/installing/running the project, see "Development" section below.

Classes / Options


The JSGS class is the class which we use for creating pico-8 machine instances.

const machine = new JSGS({
  os: new OS(), // an "OS" instance
  devices: {
    controller: new KeyboardController(), // a "Controller" instance
    ram: new Ram(0x8000), // a "Ram" instance
    cartridge: "", // url to a p8.png cartridge
    screen: [new Screen({ size: 128 })], // An array of "Screen" instances
// instantiate a 32kb ram
const ram = new Ram(0x8000);
Screen / CRTScreen
const screen = new Screen({
  size: 128, // a px size (number)
  palette: Screen.greenPalette // And array of 16 hex colors. Defaults to pico-8 palette

// Screen with crt filter
const crtScreen = new CRTScreen({
  size: 128,

// Mount to dom



For development, you will need Node.js >=6.0.0 and NPM(comes bundled with Node.js) installed on your environment.


Clone the project and install dependencies:

$ git clone
$ cd jsgs
$ npm install

Start & watch

$ npm run start-dev

Now you can browse the app at http://localhost:4000

Build for production

$ npm run build
You can’t perform that action at this time.