Getting Started
The jspicl CLI streamlines your PICO-8 game development by taking care of the build process so you can focus on the implementation.
Features:
- Built-in build pipeline powered by esbuild
- Tree-shaking to minimize token count
- PNG spritesheet support - use your favorite image editor
- Live reloading with watch mode
Installation
npm install -D @jspicl/cli
Usage
First, create a config file:
// jspicl.config.ts
import type {Config} from "@jspicl/cli/types";
const config: Config = {
jsOutput: "build/game.js",
showStats: true
};
export default config;
Then create your game file:
function _draw() {
cls();
print("hello world");
}
Now run the CLI to generate a PICO-8 cartridge:
jspicl src/game.js build/game.p8 --config jspicl.config.ts --watch
Assuming you have PICO-8 installed on your system, you should see the following:
Any changes to the source code will reload PICO-8 automatically for you.
Note: Automatic PICO-8 reload is supported on macOS and Linux. On Windows, PICO-8 will launch but you'll need to press Ctrl+R to reload manually.