This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: keys | |
0 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
poke(24364,3)w={10,11,8,2,12}o="★●♥◆✽"b={[0]=0,0,0,0,0,0}z=56h=6::_::add(b,ceil(rnd(5)))cls()j=6*(8-flr(z/8))-6 | |
?"██",8*(h%6),z+8*flr(h/6),5 | |
?t(),49,58 | |
for q=0,j+6 do | |
u=abs(b[q])for i in all{1,6}do | |
if(q<j and(i>1or q%6>1)and u==abs(b[q-i])and u==abs(b[q-i*2])and u!=0)b[q-i]=-u b[q-i*2]=-u b[q]=-u | |
end | |
?sub(o,u,u),(q%6)*8,z+flr(q/6)*8,q<j and w[u]or 1 | |
end | |
for q=0,j do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"backcolor": "#C2C3C7", | |
"name": "PICO-8 devkit keyboard", | |
"author": "tobiasvl", | |
"switchMount": "cherry", | |
"switchBrand": "cherry", | |
"switchType": "MX1A-G1xx" | |
}, | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- four directions, 16 tokens | |
for i=0,1,0.25 do | |
local x,y=cos(i),sin(i) | |
end | |
-- eight directions, 24 tokens | |
for i=0.125,1,0.125 do | |
local x,y=flr(cos(i)+.5),flr(sin(i)+.5) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
z="lights out"poke(24364,3)::x::flip()cls()k=btnp()w={[0]="","▒","█"}f=flr | |
?z,12,18,stat(95)%4 | |
?"z: classic\nx: 2000",12,32,7 | |
if(k<9)goto x | |
if(k>16)w[3]="█" | |
b={}p=2m=0 | |
for i=1,35 do | |
b[i]=i%7<2 and 0or 2 | |
end::_::flip()cls() | |
?m,30,54 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
u=64 | |
x,y=u,u | |
es={}c=circfill | |
f=abs | |
p=cos | |
o=sin::_:: | |
if(btn(0))x-=1 | |
if(btn(1))x+=1 | |
if(btn(2))y-=1 | |
if(btn(3))y+=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
poke(24364,3)x="웃"v="▥"h="▤"b={}for i=1,36 do b[i]=i%9<2 and""or"█"end for i in all{"⬆️","➡️",h,"⬅️","⬇️",v,x}do repeat f=1+flr(rnd(36))until b[f]!=""b[f]=i | |
if(i==x)p=f | |
end::_::t=btnp cls()for i=0,35 do | |
k=b[i+1] | |
?k,i%9*8,6*flr(i/9)+20,k==x and 11 or 7 | |
end b[p]=""q=p | |
if(t(0))q-=1 | |
if(t(1))q+=1 | |
if(t(2))q-=9 | |
if(t(3))q+=9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_map_position: | |
; from a sprite's pixel position, get the BG map address. | |
; d: Y pixel position | |
; e: X pixel position | |
; hl: returned map address | |
ld h, HIGH(_SCRN0) >> 2 | |
; Y | |
ld a, [rSCY] ; account for scroll | |
sub a, 16 ; account for base sprite offset |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- initialize a save file holding a `savedata` sequence | |
function init_savedata() | |
local info=love.filesystem.getInfo("savedata.lua", "file") | |
if info then | |
local data=love.filesystem.read("savedata.lua") | |
savedata={love.data.unpack("f",data,1)} | |
else | |
local file=love.filesystem.newFile("savedata.lua") | |
local ok,err=file:open("w") | |
if not ok then |