Home
Floaty is a JavaScript port of Pico-8 which aims for feature parity (with deviations in implementation where appropriate). I created Floaty so that I could teach JavaScript to non-coders without all the boilerplate it takes to go from an empty document to a working game.
I hope that it gets to the point where I can follow any Pico-8 tutorial by using the corresponding JavaScript functions and data types. I hope that it gets to the point where anyone can build a game by pasting a script tag in their HTML document and starting to code.
Showcase
Space Invaders
by
assertchris
Flappy Bird
by
assertchris
Tower Defense
by
assertchris
Platformer
by
assertchris
Sprite Editor
by
assertchris
Getting Started
Here's a tiny example of some of the code you'll need to make a game:
import Engine from 'https://floaty.dev/engine-v2.js';
const engine = new Engine();
engine.scope(({ start }) => {
const sprites = {
// this is where your sprites go
};
const sounds = {
// this is where your sounds go
};
function init() {
// things to do when the game starts
}
function update() {
// things to do each game tick:
// updating the game state
// moving the player
// handling input
}
function draw() {
// things to do each time the screen updates:
// - clearing the canvas
// - drawing on the canvas
}
start({
target: document.querySelector('.game'),
sprites,
sounds,
init,
update,
draw,
});
});