Log In  
Follow
tmountain
SHOW MORE

Hi,

I'm writing to announce tspico8, a project which allows you to create PICO-8 games using TypeScript. For anyone unfamiliar with TypeScript, it's a superset of JavaScript, and it allows you to annotate your code with static type declarations so that the compiler can find a lot of errors for you.

Some of the benefits include:

  • Write PICO-8 games in a powerful language with a lot of builtin safety
  • Take advantage of tooling to improve code quality (linting, formatting, etc)
  • Minify code automatically to reduce token size (multiple configuration options)
  • Utilize an external spritesheet if you want to (make sprites with aseprite, etc)

For anyone that's curious, the technical details of how this works are as follows:

  • TypeScript is compiled to JavaScript
  • JavaScript is minified (compressed and mangled)
  • Minified JavaScript is transpiled to PICO-8 compatible Lua
  • Everything is packaged into a cart (code & spritesheet)

PICO-8 reloads automatically on every build to save you time.

Check out the project if you're interested, and let me know what you think. Thanks!

TSPico8 project on Github

P#112949 2022-06-09 17:59

SHOW MORE

Cart #conwaylife-0 | 2020-10-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Here's a pretty minimal implementation of Conway's Game of Life for PICO-8. It has a basic performance optimization (it only updates the active area of the grid), and you can see the active area adjust by setting dbg=true at the top of the code.

That said, it gets pretty slow pretty quickly for larger simulations.

You set up the grid as follows:

Arrow keys -- move the cursor around.
Z key -- toggle a given cell to active/inactive.
X key -- start / stop the simulation.

If you're unfamiliar with the Game of Life, google it :-).
An easy starting point for a cool pattern is a ten cell contiguous row (10 connected horizontal cells).

There are better PICO-8 Game of Life carts, but I had a lot of fun making this.

Enjoy!

P#83226 2020-10-22 21:02 ( Edited 2020-10-22 21:04)

SHOW MORE

Cart #43869 | 2017-09-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Mandlebrot fractal renderer with random color cycling.

P#43870 2017-09-02 14:25 ( Edited 2017-09-02 18:35)

SHOW MORE

Cart #43873 | 2017-09-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Simple demo of pendulum physics.

P#43867 2017-09-02 14:10 ( Edited 2017-09-02 18:32)

Follow Lexaloffle:          
Generated 2024-03-19 04:25:18 | 0.081s | Q:16