Skip to content

Instantly share code, notes, and snippets.

View Liquidream's full-sized avatar

Paul Nicholas Liquidream

View GitHub Profile
@pancelor
pancelor / README.md
Last active April 17, 2024 13:14
aseprite to pico8/picotron exporter

picotron is in early alpha -- it doesn't seem to have a sprite editor yet but it does support sprites in a particular format, so I threw together this aseprite exporter.

picotron is out! importing sprites is still a bit tricky, so I built this script to help, along with this picotron cart

this script works great for pico8 too -- I use it often

how to use

you'll need Aseprite to use this.

@rostok
rostok / dehydrated-explained.p8
Created September 8, 2022 17:43
source code for dehydrated - a pico8 game under 1kb
pico-8 cartridge // http://www.pico-8.com
version 37
__lua__
-- Dehydrated - a Pico1k 2022 jam entry by https://rostok.itch.io/ @von_rostock
-- as the original code was heavily compressed here is the unpacked source with a brief description of what's going on
D={}E={} -- D E tables hold x and y global position values for wind dust particles, there are 129 dust particles in total
K={} -- K L M tables store map data, they are linear with total length of 128x310 it's hard to explain how they are organized
-- since tiles are of isometric shape. however basic address is expression is v+310*u with u/v being cell coordinates
-- K table hold compacted tile information
-- bits 1-4 represent height (value range 0..15), with 0 being water, and 1+ being sand
function _draw()
cls(8)
srand(5)
-- Iterate every 8 square pixels of the screen.
-- The `.5` is to make sure the points are at the center of each pixel.
-- We'll draw one wall of the maze in each square.
for y=.5,129,8 do
for x=.5,129,8 do
-- Progress in the rotation cycle. One rotation is [0..1]
@kometbomb
kometbomb / put-a-flip-in-it.p8
Last active December 11, 2021 13:08
#PutAFlipInIt! #pico8
-- 1. Paste this at the very bottom of your PICO-8
-- cart
-- 2. Hit return and select the menu item to save
-- a slow render gif (it's all automatic!)
-- 3. Tweet the gif with #PutAFlipInIt
--
-- Notes:
--
-- This relies on the max gif length being long
-- enough. This can be set with the -gif_len
@grifdail
grifdail / pico8colors.pde
Created June 6, 2017 14:52
pico8colors.pde
// Pico 8 colors for processing
color BLACK = #000000;
color DARK_BLUE = #1D2B53;
color DARK_PURPLE = #7E2553;
color DARK_GREEN = #008751;
color BROWN = #AB5236;
color DARK_GRAY = #5F574F;
color LIGHT_GRAY = #C2C3C7;
color WHITE = #FFF1E8;
@ericdoi
ericdoi / add_innext_mapping.sh
Last active October 5, 2018 09:28
Adds SDL controller mapping for the iNNext USB SNES controller to PICO-8
# Adds an SDL controller mapping for the iNNext USB SNES controller to PICO-8.
# Amazon Link: http://a.co/138eRWB
# E.g. can be used on PocketCHIP: wget -O add_innext_mapping.sh https://goo.gl/YosH3I; source add_innext_mapping.sh
echo "03000000790000001100000010010000,USB Gamepad,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1," >> ~/.lexaloffle/pico-8/sdl_controllers.txt && echo "Added controller mapping!"