PICO-8 has been my obsession for the last few months but math is my always obsession and lately I've been having a lot of fun playing around with various aspects of geometry so when I hit a weird bug in my other project I decided to take a break and shift gears a bit. So I threw together a little interface for working with 2D signed distance fields/functions.
It's fairly hefty at a little over 500 tokens so probably not super useful generally speaking but pretty fun to play with, if I do say so myself.
Here are a couple series of images I've created so far. In each, all of the images are made from the same SDF and just messing with how colours are assigned based on the distance.

That last one is my attempt at a ripply/watery reflection which, I think, didn't come out too badly.
And some hearts.


Here's a function that will transform whatever you pass it into a table that will hopefully be understandable by a human. It'll take any table or other Lua value, so you can, for example, print it:
print(ins({1,2,3,foo=bar}),1,1) printh(ins({1,2,3,foo=bar})) |
The only parameter besides the string to be transformed is the depth.
local deep={l1={l2={l3={l4="!"}}}}} print(ins(deep)) --prints everything print(ins(deep,2)) --stops at l2 and prints {_} |
As the author of the inspect.lua library, I use it a lot on my day job when I need to debug Lua, and I really miss it when debugging in Pico-8. I found
Anyone know why devkit mouse won't work/respond when I use a shader html plate? (like from here: https://www.lexaloffle.com/bbs/?tid=33488)
Without the shader fx code it works fine.
Does anyone know if it's possible to run "splore" from inside a game? My situation right now is that I've got Pico8 up and running on my Emulation Station arcade machine, and I'm wondering if I could make a Splore program which opens splore at runtime.
Currently, I've got pico8 setup so that selecting a cart will run it with pico8, but there was another method that just runs pico8 with splore, but won't let you access your carts that are already loaded onto the machine.
Any help is appreciated!
Cheers, Leo

Is it possible to request a username change? I emailed [email protected] about changing my username a few months ago and followed up a week ago, but I've gotten no response? Does anyone know another way of getting in contact with Zep?

I'm trying to make the line move when variable "g" increases
function _init() g=1 end function _update() if (btn(2)) g+=1 if (btn(3)) g-=1 end function _draw() cls() circ(64, 64, 20, 7) x = 64 + cos(g()) * 20 y = 64 + sin(g()) * 20 line(64, 64, x, y) print(g) end |
If anyone has any tips for me, or a good sin() cos() tutorial, it would be a great help.


Had a video on ray casting pass by in my Youtube feed the other day and thought I'd play around with it a bit.
There are the four outer walls and then four randomly generated interior walls. It's casting 27 rays so, when moving, that's 216 intersections calculated per frame at 60 fps. Either more walls or more rays forces it down to 30 fps so it's a bit of a performance hog (okay, a huge performance hog.) I'm sure it could be optimized somewhat, though I'm unlikely to do it.
Edit: Okay, so apparently I lied. I realized that I could have my rays do double duty by calculating two intersection points each, one in each direction along the line. So I get effectively twice as many rays for virtually no extra cost.




Hello, people
My account Jackjack31363 was banned
Big oof
The problem is that it's the account I bought Pico-8 on
And the one I use the most overall
It also seems all of my comments have been removed
I'm pretty sure I know what happened through
Posting the entire bee movie script will do that to you
So I kinda want my account unbanned
I will be trying to contact their about thing later
But it is sad
I'm totally not doing that ever again
Posting the bee movie I mean
Just seeing if it can be unbanned through the forums
- Jackjack31363


Can someone please tell me how to change a map tile with a sprite over it because I can't figure it out
heres my code
--player
function make_player()
p={}
p.h=10
p.a=3
p.d=1
p.dead = false
p.x=8
p.y=8
p.tx=1
p.ty=1
end
function player_move()
p.tx = p.x/8
p.ty = p.y/8
if (btn(0)) then p.x = p.x - 8 end
if (btn(1)) then p.x = p.x + 8 end
if (btn(2)) then p.y = p.y - 8 end
if (btn(3)) then p.y = p.y + 8
end
end
function overlap(x,y)
if (btn(5)) and fget == 3 then mset(p.tx,p.ty,4)
end
end


