pico8 init

This commit is contained in:
James Turk 2023-03-07 19:29:31 -06:00
commit 2f98a2fa26
5 changed files with 756 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.log
demos

100
improv.p8 Normal file
View File

@ -0,0 +1,100 @@
pico-8 cartridge // http://www.pico-8.com
version 41
__lua__
-- letter select
letters = {
"a", "b", "c", "d", "e", "f",
"g", "h", "i", "j", "k", "l",
"m", "n", "o", "p", "q", "r",
"s", "t", "u", "v", "w", "x",
"y", "z", "_", "<", "★"
}
lsel = {
pos = 1,
row_w = 13,
word = ""
}
function _draw()
cls()
lsel:draw(10, 10)
end
function _update()
lsel:update()
end
function lsel:update()
if btnp(⬅️) then
self.pos -= 1
elseif btnp(➡️) then
self.pos += 1
elseif btnp(⬇️) then
self.pos += self.row_w
elseif btnp(⬆️) then
self.pos -= self.row_w
elseif btnp(🅾️) then
letter = letters[self.pos]
if letter == "_" then
self.word = self.word.." "
elseif letter == "<" then
self.word = sub(self.word, 0, #self.word-1)
else
self.word = self.word..letter
end
end
end
function lsel:draw(x, y)
local cx = x
for i,l in pairs(letters) do
if i == lsel.pos then
print(l, cx, y, 7)
rect(cx-2, y-2, cx+4, y+6, 10)
else
print(l, cx, y, 1)
end
cx += 8
if i>0 and i%self.row_w==0 then
y += 8
cx = x
end
end
print(self.word)
end
__gfx__
00000000000000bbbbb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000bbcccccbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000bcccccccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
8000000000bccc88888cccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
c80000000bccc8000008cccb00000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
cc8000000bcc800000008ccb0000008c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ccc800000bcc800000008ccb000008cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
cccc80000bcc800000008ccb00008ccc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
bcccc8000bccc8000008cccb0008cccc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0bcccc8000bccc88888cccb0008ccccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00bcccc8000bcccccccccb0008ccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000bcccc8000bbcccccbb0008ccccb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000bcccc80000bbbbb00008ccccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000bcccc8000000000008ccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000bcccc80000000008ccccb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000bcccc800000008ccccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000bcccc8000008ccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000bccc8000008cccb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

397
snowdogs.p8 Normal file
View File

@ -0,0 +1,397 @@
pico-8 cartridge // http://www.pico-8.com
version 41
__lua__
-- snow dogs
-- by jpt
function _init()
create_particles()
end
function _update()
update_snow()
if mode == "title" then
update_title()
elseif mode == "game" then
handle_input()
update_trees()
end
end
function _draw()
if mode == "title" then
draw_title()
draw_snow()
elseif mode == "game" then
draw_game()
draw_snow()
--pdebug()
draw_hud()
end
end
function draw_game()
cls()
rectfill(0,0,128,128, 6)
draw_dog(5, 0, 0)
draw_dog(5, 0, 1)
draw_dog(6, 1, 0)
draw_dog(7, 1, 1)
draw_dog(7, 0, 2)
draw_dog(6, 1, 2)
draw_trees()
end
-->8
-- particles
particles = {}
max_x = 200
function create_particles()
for i=1,300 do
particles[i] = {
y=rnd(128)-128,
x=rnd(max_x),
dir=rnd(2)-1
}
end
end
function draw_snow()
for p in all(particles) do
pset(p.x, p.y, 7)
end
end
function update_snow()
for p in all(particles) do
p.x += p.dir - steering
p.y += 1 + speed
if p.y > 128 or p.x < 0 then
p.y = 0
p.x = rnd(max_x)
end
end
end
-->8
-- game entities
function draw_dog(dog_n, x, y)
-- x is 0..1
-- y is 0..4
dog_x = (
74 - (16 * x) +
(steering*4*y)
)
-- grey transparency
palt(0b000001000000000)
spr(dog_n, dog_x,
128-(16*(y+1)), 1, 2)
palt()
end
function draw_tree(x, y)
spr(11, x, y, 1, 2)
end
function pdebug()
print("sledx "..sled_x, 0, 0, 11)
print("speed "..speed)
end
function draw_trees()
for i=1,8 do
draw_tree(
left_wall[i]-8 - sled_x + 64,
(i-1)*16
)
draw_tree(
right_wall[i] - sled_x + 64,
(i-1)*16
)
end
end
function update_trees()
local new_dist = distance + speed
if flr(new_dist / 16) > flr(distance / 16) then
for i = 8,2,-1 do
left_wall[i] = left_wall[i-1]
right_wall[i] = right_wall[i-1]
end
left_wall[1] = left_wall[2] + rnd(21) - 10
right_wall[1] = right_wall[2] + rnd(21) - 10
end
end
function draw_hud()
rectfill(14,0,114,4,7)
rectfill(14,1,14+distance/10000*100,3,11)
for l=0,5 do
print("🐱", 1, 1+l*7, 7)
end
end
-->8
-- global state
mode = "title"
steering = 0
speed = 1
distance = 0
sled_x = 64
left_wall = {
22, 20, 20, 18,
18, 16, 16, 16,
}
right_wall = {
112, 112, 114, 114,
116, 118, 118, 118
}
-->8
-- input processing
function handle_input()
if btn(0) then
steering = -1
elseif btn(1) then
steering = 1
else
steering = 0
end
if btn(2) then
speed = 2
else
speed = 1
end
distance += speed
sled_x += steering * speed
end
-->8
-- title
title_y = 0
title_stretch = 0
title_rainbow = 0
title_susan = -40
title_89 = 40
function update_title()
if title_y < 50 then
title_y += 1
elseif title_stretch < 16 then
title_stretch += 1
end
if title_stretch == 16 and title_susan < 30 then
title_susan += 1
title_89 -= 1
end
if btnp(4) then
mode = "game"
end
end
function draw_title()
cls(0)
if title_susan then
print("susan butcher's",
title_susan,
title_susan + 10, 12)
end
pal(8, 8+t()%6)
pal(12, 8+(t()+4)%6)
sspr(48, 24, 54, 16,
40-title_stretch,
title_y,
54+title_stretch*2,
16+title_stretch)
sspr(104, 24, 16, 16,
70+title_89,
100+title_89,
48, 48)
end
__gfx__
00000000644444466444444667c7c7c6666666666666666666666666666666660000000000033000666666666666666600000000666666666666666600000000
000000006499994664999946c777777c666666666666666666666666556666550000000000033000666336666663766600000000466666646666666600000000
00700700693993966939939677077077666666666666666666666666565555650000000000333300666336666663366600000000446666444666666600000000
00077000699999966999999d77777777666666666466664660066776665555660000000000333300663333666633776600000000444664446666666600000000
0007700069999996699999dd77788777666666666444444666007766655555560000000003333330663333666637736600000000646666466666666600000000
00700700699ee996699ee9dd67777776666666666644446666777066655555560000000000044000663333666633336600000000664444666666666600000000
0000000066999966669999dd66777766666666666644446666070066665555660000000000044000633333366333777600000000660440666666666600000000
0000000066699666666996dd67777776666666666664466666677666666556660000000000044000633333366377733600000000664444444444446600000000
000000006dd99dd66dd99ddd77777777666666666664466666707766665555660000000000000000633333366333333600000000664444044444444600000000
00000000ddddddddddddddd677677677666666666644446666077766655555560000000000000000333333333333777700000000666440044444444400000000
00000000dd2222dddd22222677677677666666666644446666770066655555560000000000000000333333337777733300000000666440444444444400000000
00000000dd2222dddd22222677677667666666666644446666770766655555560000000000000000666446666664466600000000666666444444444600000000
00000000dd2222dddd22222666677766666666666644446666077766655555560000000000000000666446666664466600000000666666446666644600000000
00000000dd2222dddd22222666777776666666666644446666077766655555560000000000000000666446666664466600000000666666446666644600000000
00000000d222222dd222222667777776666666666644446666677666665555660000000000000000666446666664466600000000666666446666644600000000
00000000622222266222222667777776666666666664466666607666666556660000000000000000666446666664466600000000666666046666604600000000
00000000622222266666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000622662266666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000622662266666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000622662266666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000622662266666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000622662266666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000666666666666666666666666666666660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000666666666666666666666666000000000000000066660666600066660666600066000666666000066000666600000000080000000000000000000000
00000000666666666666666666666666000000000000000066660666660066660666600600600660000600666600666660000000800888800088880000000000
00000000666666666666666666666666000000000000000006600660066006600066006600660660000606600660660066000000008000080000008000000000
00000000666666666666666666666666000000000000000006600660006006600066006600660666666606600660660006000000008000080000008000000000
00000000666666666666666666666666000000000000000006600660006006600066006666660666660006600660660006000000000888800088888000000000
00000000666666666666666666666666000000000000000006600660066006600066006600660660660006600660660066000000008000080000008000000000
00000000666666666666666666666666000000000000000066660666660066660066006600660660066000666600666660000000008000080000008000000000
00000000666666666666666666666666000000000000000066660666600066660066006600660660006600066000666600000000000888800088880000000000
__label__
60606060600000000060000000006000000000000000000000000000000000000000000000000000000000000000000000006000000000600000000060606060
00000000006000000000600000000060000000000000000000000000000000000000000000000000000000000000000000600000000060000000006000000000
00000000000060000000006000000000606000000000000000000000000000000000000000000000000000000000006060000000006000000000600000000000
60606000000000600000000060000000000060000000000000000000000000000000000000000000000000000000600000000000600000000060000000006060
00000060000000006000000000600000000000606000000000000000000000000000000000000000000000006060000000000060000000006000000000600000
00000000600000000060000000006000000000000060606060606060606060600060606060606060606060600000000000006000000000600000000060000000
60600000006000000000000000000060000000000000000000000000000000006000000000000000000000000000000000600000000000000000006000000060
00006000000060000000600000000000606000000000000000000000000000000000000000000000000000000000006060000000000060000000600000006000
00000060000000600000006000000000000060606060606060606060606060606060606060606060606060606060600000000000006000000060000000600000
60000000600000006000000060000000000000000000000000000000606060606060606060000000000000000000000000000000600000006000000060000000
00600000000000000000000000606000000000000000000060606060606060606060606060606060600000000000000000006060000000000000000000000060
00006000006000000060000000000060606060606060606060606060606000000000006060606060606060606060606060600000000000600000006000006000
00000000000060000000600000000000000000000000606060606060606060606060606060606060606060000000000000000000000060000000600000000000
60000060000000600000006060000000000000006060606060600000000000000000000000000060606060606000000000000000606000000060000000600000
00000000600000006000000000606060606060606060606000000000000000000000000000000000006060606060606060606060000000006000000060000000
00600000000000000060000000000000000000606060606060606060606060606060606060606060606060606060000000000000000000600000000000000060
00006000006000000000600000000000006060606060000000000000000000000000000000000000000000606060606000000000000060000000006000006000
00000060000060000000006060606060600060600000000000000000000000000000000000000000000000000060600060606060606000000000600000600000
60000000000000600000000000000000606060606060606060606060606000000000006060606060606060606060606060000000000000000060000000000000
00600000600000006000000000000060606060000000000000000000000060606060600000000000000000000000606060600000000000006000000060000060
00000000006000000060606060606060606000000000000000000000000000000000000000000000000000000000006060606060606060600000006000000000
00006000000060000000000000006060606060606060606060000000000000000000000000000000606060606060606060606000000000000000600000006000
60000060000000600000000000606060600000000000000000606000000000000000000000006060000000000000000060606060000000000060000000600000
00000000000000006060606060006060000000000000000000000060606000000000006060600000000000000000000000606000606060606000000000000000
00600000600000000000000000606000606060606060000000000000000060606060600000000000000000606060606060006060000000000000000060000060
00006000006000000000006060600060000000000000600000000000000000000000000000000000000060000000000000600060606000000000006000006000
00000000000060606060600060606000000000000000006060000000000000000000000000000000606000000000000000006060600060606060600000000000
60000060000000000000006060606060606060600000000000600000000000000000000000000060000000000060606060606060606000000000000000600000
00600000600000000000606060600000000000006000000000006060000000000000000000606000000000006000000000000060606060000000000060000060
00000000006060606060000060000000000000000060000000000000606060600060606060000000000000600000000000000000600000606060606000000000
00006000000000000000606000606060606000000000600000000000000000006000000000000000000060000000006060606060006060000000000000006000
60000060000000000060606060000000000060000000006000000000000000000000000000000000006000000000600000000000606060600000000000600000
00600000606060606060606000000000000000600000000060600000000000000000000000000060600000000060000000000000006060606060606060000060
00000000000000000000000060606060600000006000000000006000000000000000000000006000000000006000000060606060600000000000000000000000
00006000000000006060606000000000006000000060000000000060600000000000000060600000000000600000006000000000006060606000000000006000
60000060606060606060600000000000000060000000600000000000006060606060606000000000000060000000600000000000000060606060606060600000
00000000000000000000006060606060000000000000006000000000000000000000000000000000006000000000000000606060606000000000000000000000
00600000000000606060600000000000600000600000000060000000000000000000000000000000600000000060000060000000000060606060000000000060
00006060006060600000000000000000000000006000000000600000000000000000000000000060000000006000000000000000000000000060606000606000
60000000600000006060006060606000006000000060000000006060000000000000000000606000000000600000006000006060606000606000000060000000
00600000000060606000600000000060000060000000600000000000606060606060606060000000000060000000600000600000000060006060600000000060
00006060606000000060000000000000000000600000006000000000000000000000000000000000006000000060000000000000000000600000006060606000
00000000000060606000606060600000600000000000000060000000000000000000000000000000600000000000000060000060606060006060600000000000
60000000006000000060000000006000006000006000000000606000000000000000000000006060000000006000006000006000000000600000006000000000
00606060600060606000000000000060000000000060000000000060606060606060606060600000000000600000000000600000000000006060600060606060
00000000006000000000606060000000000060000000600000000000000000000000000000000000000060000000600000000000606060000000006000000000
00000000600060600060000000600000600000600000006000000000000000000000000000000000006000000060000060000060000000600060600060000000
60606060006000006000000000006000000000000000000060606060606060606060606060606060600000000000000000006000000000006000006000606060
00000000000060600060606060000060006000006000000000000000000000000000000000000000000000006000006000600000606060600060600000000000
00000000600000006000000000600000000060000060000000000000006060606060606000000000000000600000600000000060000000006000000060000000
60606060006060000000000000006000600000000000606060606060606060606060606060606060606060000000000060006000000000000000606000606060
00000000600000600060606060000000000000600000000000000000606060606060606060000000000000000060000000000000606060600060000060000000
00000060006000006000000000000060006000006000000000006060606060000000606060606000000000006000006000600000000000006000006000600000
60606000000060600000000000600000000060000060606060600060600000000000000060600060606060600000600000000060000000000060600000006060
00000000606000000060606000006000600000000000000000006060006060606060606000606000000000000000000060006000006060600000006060000000
00000060000060006000000060000000000000600000000000606060600000000000000060606060000000000060000000000000600000006000600000600000
60606000600000600000000000600060006000006060606060606000000000000000000000006060606060606000006000600060000000000060000060006060
00000000006000000060606000006000000060000000000000000060006060606060606000600000000000000000600000006000006060600000006000000000
00000060000060006000000060000000600000600000000060606000600000000000000060006060600000000060000060000000600000006000600000600000
60606000600000600000000000600060006000006060606000000060000000000000000000600000006060606000006000600060000000000060000060006060
00000060006000000060606000000000000000000000000060600000006060606060606000000060600000000000000000000000006060600000006000600000
00000000600060006000000060006000600060000000006000006000600000000000000060006000006000000000600060006000600000006000600060000000
60606000000000600000000000600060000000606060600060000060000000000000000000600000600060606060000000600060000000000060000000006060
00000060006000000060606060000000006000000000006000600000000060606060600000000060006000000000006000000000606060600000006000600000
00006000600060006000000000006000600060000000000060006000006000000000006000006000600000000000600060006000000000006000600060006000
60600000000000600000000000600060000000606060600000000000600000000000000060000000000060606060000000600060000000000060000000000060
00000060006000000060606060006000006000000000006000600060000000000000000000600060006000000000006000006000606060600000006000600000
00006000600060006000000000600000600060000000600060000000000060606060600000000000600060000000600060000060000000006000600060006000
00600000000000600000000000000060000000600060000000006000006000000000006000006000000000600060000000600000000000000060000000000060
60000060006000000060606060006000006000006000006000600000600000000000000060000060006000006000006000006000606060600000006000600000
00006000000060006000000000600000600060000000600000000060000000000000000000600000000060000000600060000060000000006000600000006000
60600000600000000000000000006060000000606060000060000000000000000000000000000000600000606060000000606000000000000000000060000060
00000060006000600000606060600000606000000000000000006000000060606060600000006000000000000000006060000060606060000060006000600000
00006000000000000060000000000060000060000000006000600000006000000000006000000060006000000000600000600000000000600000000000006000
60600000600060006000000000006000006000606060600000000000600000000000000060000000000060606060006000006000000000006000600060000060
00000060000000000000606060600060600000000000000060000060000000000000000000600000600000000000000060600060606060000000000000600000
00000000006000600060000000006000006060000000006000000000000000000000000000000000006000000000606000006000000000600060006000000000
60606000600060000000000000000060600000606060600000006000000000000000000000006000000060606060000060600000000000000000600060006060
00000000000000006000006060606000606060000000000000600000000060606060600000000060000000000000606060006060606000006000000000000000
00000060006000600000600000000060000000600000000060000000606000000000006060000000600000000060000000600000000060000060006000600000
60606000000000000060000000000000606060006060606000000060000000000000000000600000006060606000606060000000000000600000000000006060
00000000600060000000000060606060000000600000000000006000000000000000000000006000000000000060000000606060600000000000600060000000
00000060000000006000006000000000606060006000000000600000000000000000000000000060000000006000606060000000006000006000000000600000
60606000006000600000600000000000006060600060606060000000000000606060000000000000606060600060606000000000000060000060006000006060
00000000600000000060000060606060600060006000000000000000006060000000606000000000000000006000600060606060600000600000000060000000
00000000000060000000000000000000006000600060000000000060600000000000000060600000000000600060006000000000000000000000600000000000
60606060000000006000006000000000000060606000606060606000000000000000000000006060606060006060600000000000006000006000000000606060
00000000006000600000600000006060606060606060000000000000000000000000000000000000000000606060606060606000000060000060006000000000
00000000600000000060000000600000000000606000600000000000000000606060000000000000000060006060000000000060000000600000000060000000
60606060000060000000000060000000000000006060006060606060606060000000606060606060606000606000000000000000600000000000600000606060
00000000000000006000006000000060606060600060600000000000000000000000000000000000000060600060606060600000006000006000000000000000
60000000006000000000600000006000000000006060606060000000000000000000000000000000606060606000000000006000000060000000006000000000
00606060600000600000000000600000000000000000606000606060606060606060606060606060006060000000000000000060000000000060000060606060
00000000000060000060000060000000606060606060606060600000000000000000000000000060606060606060606060000000600000600000600000000000
60000000006000006000006000000060000000000000006060606060000000000000000000606060606000000000000000600000006000006000006000000000
00606060600000000000000000006000000000000000000060606060606060606060606060606060600000000000000000006000000000000000000060606060
60000000000000600000600000600000000060606060606060606060606000000000006060606060606060606060600000000060000060000060000000000000
00600000000060000060000000000000006000000000000000006060606060606060606060606000000000000000006000000000000000600000600000000060
60006060606000000000000060000000600000000000000000000000006060606060606000000000000000000000000060000000600000000000006060606000
60600000000000006000006000000060000000006060606060606060606060606060606060606060606060606000000000600000006000006000000000000060
00006000000000600000000000006000000000600000000000000000000000000000000000000000000000000060000000006000000000000060000000006000
60600060606060000000600000600000000060000000000000000000000000000000000000000000000000000000600000000060000060000000606060600060
00006000000000000060000000000000006000000000006060606060606060606060606060606060606000000000006000000000000000600000000000006000
60600060000000006000000060000000600000000060600000000000000000000000000000000000000060600000000060000000600000006000000000600060
60606000606060600000006000000060000000006000000000000000000000000000000000000000000000006000000000600000006000000060606060006060
00000000000000000000600000006000000000600000000000000000606060606060606060000000000000000060000000006000000060000000000000000000
60606060000000000060000000600000000060000000000000606060000000000000000000606060000000000000600000000060000000600000000000606060
00606060606060606000000060000000006000000000006060000000000000000000000000000000606000000000006000000000600000006060606060606060
60006000600000000000000000000000600000000000600000000000000000000000000000000000000060000000000060000000000000000000000060006000
00600060006000000000606000000060000000006060000000000000000000000000000000000000000000606000000000600000006060000000006000600060
00006060600060606060000000006000000000600000000000000000606060606060606060000000000000000060000000006000000000606060600060606000
60600060606000000000000000600000000060000000000000006060000000000000000000606000000000000000600000000060000000000000006060600060
00006000600060000000000060000000006000000000000060600000000000000000000000000060600000000000006000000000600000000000600060006000
00000060006000606060606000000000600000000000606000000000000000000000000000000000006060000000000060000000006060606060006000600000
60606060606060000000000000000060000000000060000000000000000000000000000000000000000000600000000000600000000000000000606060606060
00000000606060600000000000006000000000006000000000000000000000000000000000000000000000006000000000006000000000000060606060000000
00000000006060606060606060600000000060600000000000000060606060606060606060600000000000000060600000000060606060606060606000000000
60606060600060000000000000000000006000000000000000606000000000000000000000006060000000000000006000000000000000000000600060606060
00000000006060606060000000000000600000000000006060000000000000000000000000000000606000000000000060000000000000606060606000000000
00000000000000606000606060606060000000000000600000000000000000000000000000000000000060000000000000606060606060006060000000000000
00606060606060006060000000000000000000006060000000000000000000000000000000000000000000606000000000000000000000606000606060606060
60000000000000606060600000000000000060600000000000000000000060606060600000000000000000000060600000000000000060606060000000000000
00000000000000006060606060606060606000000000000000006060606000000000006060606000000000000000006060606060606060606000000000000000
00000000000000000060606000000000000000000000000060600000000000000000000000000060600000000000000000000000006060600000000000000000
00000000000000000000606060000000000000000060606000000000000000000000000000000000006060600000000000000000606060000000000000000000
00000000000000000000006060606060606060606000000000000000000000000000000000000000000000006060606060606060606000000000000000000000
00000000000000000000000060600000000000000000000000000000000000000000000000000000000000000000000000000060600000000000000000000000
00000000000000000000000000606060000000000000000000006060606060606060606060606000000000000000000000606060000000000000000000000000
__map__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
01030000000000000000000020500305004050050500a050100502a0502805027050292502725025250212501e25019250162502c150261501d15000000000000000000000000000000000000000000000000000
001000001325013250132502525023250142401c24026230142502526027240282502625020250192501725017250192501b25012250000000000000000000000000000000000000000000000000000000000000
__music__
00 01424344

65
toomgis.p8 Normal file
View File

@ -0,0 +1,65 @@
pico-8 cartridge // http://www.pico-8.com
version 41
__lua__
function x_draw()
cls()
amc = 9 --orange (-1, red)
pmc = 2 --purple (-1, blue)
end
function _draw()
cls()
sprm(0, 20, 20, 1, 2)
sprm(32, 20, 32, 1, 2)
sprm(44, 80, 80, 1, 2)
sprm(0, 50, 100, 1, 2)
sprm(32, 50, 112, 1, 2)
spr(35, 50, 112, 2, 2)
sprm(15, 100, 10, 1, 4)
end
function sprm(n, x, y, w, h)
spr(n, x, y, w, h)
spr(n, x+w*8, y, w, h, true)
end
__gfx__
000022220000000000000000000ee000aaaaaaaa00000000005555000454540000999900000870000000000000cccc0000777000000000000000000000005555
000222220000000000000000009ea9000aa77aa0060000000088880004545400099999900007400009f9f9f00cccccc006444660000000000000000000055555
002244440000000000000000009ae9000aa778a000666600008ff800055555000aaaa8a000444700999999990ccccfc006444666000000000000000000055555
002245540000000000000000009aa9000a8888a00088880000ffff0004545400088aaaa000477700aaaaaaaa0cfcffc006444606000000000000000000099999
002250740000000000000000009ae9000a877aa00087870000f44f0004545400008aa80000ffff004a444a440cffccc006444666000000000000000000099999
022247440000000000000000009ea9000aaaaaa000787800008ff8000555550000aa880000ffff00bbb88abb0cfffcc006444660000000000000000000997799
022224440000000000000000009ae9000aaaaaa0008787000088880004545400000aa000000ff000999989990cccccc006644600000000000000000000977779
022224000000000000000000000ee00000aaaa000088880000088000045454000008a000000ff0000999999000cccc0000666600000000000000000009977079
02202944000000000000000000333300000033000000000000033000000330000003300000000000000000000033330000000000000000000000000009997799
202029990000000000000000030330300000033000330300023333300099990003333330000000300000000003ffff3000000000000000000000000009999999
20202099000000000000000030300303000999330000300022233320099a9a90033bb33000000b300000000003ffff3000000000000000000000000009999999
202024090000000000000000030330300099990300888800023202229999999933bbbb330000b33000000000033333300000000000000000000000000a990000
2020404f00000000000000000330033000999900088888800322232099999a9933bbbb33000b330000000000033333300000000000000000000000000a999000
0020040f00000000000000000003300009999000088888800202020099999999333bb33300b3300000000000033333300000000000000000000000000aaa9999
00000000000000000000000000033000999000000888888022202220099999900333333003330000000000000333333000000000000000000000000000aa9999
00000000000000000000000000033000990000000088880002000200009999000030030000000000000000000033330000000000000000000000000000aaaaaa
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000aaaaaa
00000000000000000000000000000000000006440000000000000000099999099099099000000000000000000000000000000011000000000000000000a0aaaa
0700077700000000000000000000000000006444000000000000000099909909999999900000000000000000000000000000011100000000000000000000aaaa
00707700000000000000000000000000000044540000000000000000999099099099099000000000000000000000000000001111000000000000000000009aaa
0007077700000000000000000000000000044546000000000000000088808808808808800000000000000000000000000000066600000000000000000009999a
000777000000000000000000000000000044540000000000000000000880880880880880000000000000000000000000000006b6000000000000000000999999
0007777700000000000000000000000bb44540000000000000000000008888088088088800000000000000000000000000000166000000000000000009999999
00007000000000000000000000000bbbb55400000000000000000000000000000000000000000000000000000000000000000016000000000000000009999999
000077770000000000000000000bbbbb5b5400000000000000000000000000000000000000000000000000000000000000111001000000000000000099999999
0000000700000000000000000bbbb77575bb00000000000000000000022220022022022000000000000000000000000006611111000000000000000999999999
000000770000000000000000bbbb775757bb00000000000000000000020222022222222000000000000000000000000000001111000000000000000999999999
000007700000000000000000bbbbbbb577bb00000000000000000000020222022022022000000000000000000000000000011111000000000000000999999999
000000700000000000000000000000b77bb000000000000000000000011110011011011000000000000000000000000000111111000000000000000999999999
000007000000000000000000000000b7bb0000000000000000000000011000011011011000000000000000000000000000111111000000000000000999999999
000077000000000000000000000000bbb00000000000000000000000011000011011011100000000000000000000000000111111000000000000000999999999
000770000000000000000000000000bb000000000000000000000000011000000000000000000000000000000000000000000440000000000000000009999999
__map__
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000010030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

192
yoyodyne.p8 Normal file
View File

@ -0,0 +1,192 @@
pico-8 cartridge // http://www.pico-8.com
version 41
__lua__
function _init()
yyl:init()
end
function _update()
yyl:update()
end
function _draw()
cls()
yyl:draw()
end
-->8
-- yoyodyne logo
yyl = {
ps = {},
filled = {},
ex = 0,
ey = 128,
vx = 0,
vy = -1,
done = false,
maxt = 60,
}
function dist(x1, y1, x2, y2)
return sqrt(
(x2-x1)^2 + (y2-y1)^2
)
end
function yyl:init()
for x=0,128 do
for y=0,100 do
seq = 128*y + x
-- y stem
if y >= 50 and x < 54 and x > 46 then
self.filled[seq] = 8
self.filled[seq-6] = 12
end
if y >= 50 and x > 75 and x < 82 then
self.filled[seq] = 8
self.filled[seq+6] = 12
end
-- arms of y
if y < 50 and y > 10 then
if abs(x-y) < 4 then
self.filled[seq] = 8
self.filled[seq-6] = 12
end
if abs(128-x-y) < 4 then
self.filled[seq] = 8
self.filled[seq+6] = 12
end
end
-- green o
local od = dist(x, y, 64, 30)
if od > 10 and od <= 15 then
self.filled[seq] = 11
end
-- blue o
if od > 15 and od < 20 then
self.filled[seq] = 12
end
end
end
end
function yyl:chk_stop(p)
-- round to nearest whole
seq = 128*flr(p.y+0.5) + flr(p.x+0.5)
if self.filled[seq] == p.c then
p.vy = 0
p.x = flr(p.x+0.5)
p.y = flr(p.y+0.5)
self.filled[seq] = true
-- note! there is a bug
-- nearby, filled is set
-- incorrectly sometimes
-- not sure why
end
end
function yyl:fill_it_in()
-- reset filled as workaround
-- for chk_stop bug
yyl:init()
for i,c in pairs(self.filled) do
y = flr(i/128)
x = i-(128*y)
add(self.ps, {x=x, y=y, c=c, vy=0,vx=0})
end
self.done = true
end
function yyl:update()
if not self.done then
-- emit pixels
for c in all{8, 11, 12} do
add(self.ps,
{x=self.ex, y=self.ey, c=c,
vy=rnd(2)+2*self.vy,
vx=rnd(2)+2*self.vx}
)
end
-- fill it in?
if t() > self.maxt then
self:fill_it_in()
end
-- move emitter
if self.ex < 128 then
self.ex += 1
elseif self.ex == 128 then
self.ey += 1
end
end
-- update pixels
for i, p in pairs(self.ps) do
if p.vy > 0 then
p.x += p.vx
p.y += p.vy
self:chk_stop(p)
if p.y < 0 or p.y > 128 or p.x < 0 or p.x > 128 then
deli(self.ps, i)
end
end
end
end
function yyl:draw()
for p in all(self.ps) do
pset(p.x, p.y, p.c)
end
if self.done then
print("d", 64, 52, 11)
print("y", 64, 58, 11)
print("n", 64, 64, 11)
print("e", 64, 70, 11)
end
end
__gfx__
00000000000000bbbbb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000bbcccccbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000bcccccccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
8000000000bccc88888cccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
c80000000bccc8000008cccb00000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
cc8000000bcc800000008ccb0000008c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ccc800000bcc800000008ccb000008cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
cccc80000bcc800000008ccb00008ccc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
bcccc8000bccc8000008cccb0008cccc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0bcccc8000bccc88888cccb0008ccccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00bcccc8000bcccccccccb0008ccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000bcccc8000bbcccccbb0008ccccb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000bcccc80000bbbbb00008ccccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000bcccc8000000000008ccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000bcccc80000000008ccccb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000bcccc800000008ccccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000bcccc8000008ccccb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000bccc8000008cccb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000bcc8000008ccb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
000f041e00500005001d550225502255027550275502e5502e55027550275503055027550225501f5501b5501b5501f55022550275502c5502d5502d5502855026550255502655027550245501f5501b55016550