0.2.7 • Published 3 years ago

pota-8 v0.2.7

Weekly downloads
29
License
MIT
Repository
github
Last release
3 years ago

POTA-8

POTA-8 is a HTML5 engine for potato-quality games, inspired by PICO-8. I made it for my own prototyping and game jams and is a little thin on documentation, but anyone else is welcome to try it out or tinker with it.

Example

Access framework functions/variables through global p object.

import { init } from "pota-8";

let x, y;

init({
  setup() {
    // set x/y to screen center
    x = p.width / 2;
    y = p.height / 2;
  },

  loop() {
    // clear screen with bg color
    p.clear([32, 64, 0]);

    // move circle
    if (p.isDown("up")) y -= 32 * p.deltaTime;
    if (p.isDown("down")) y += 32 * p.deltaTime;
    if (p.isDown("left")) x -= 32 * p.deltaTime;
    if (p.isDown("right")) x += 32 * p.deltaTime;

    // draw white circle
    p.circle(x, y, 32, [255, 255, 255]);
  }
});
0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago