-
Notifications
You must be signed in to change notification settings - Fork 1
/
color_stripes.p8
115 lines (107 loc) · 7.37 KB
/
color_stripes.p8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
function _init()
poke(0x5f34, 1)
-- create fx coroutines
cboard = cocreate(board)
clines = cocreate(lines)
frameflag = false
end
function _update60()
frameflag = not frameflag
end
function _draw()
memset(0x6000, 0, 0x2000)
coresume(cboard)
coresume(clines)
end
function lines()
local ph, ph1, col, phy, phy1, width, x = 0, 0, 0
while true do
phy = ph
phy1 = ph1
for y = 0,127 do
x = 64 + sin(phy) * 50
width = abs(sin(phy1) * 10)
line(x + width, y, x + width + 5, y, 0x1100.5a5a)
line(x - width, y, x + width, y, flr((y + col * 0.5) / 4 % 15) + 0x1000.0000)
x = 64 + sin(phy * 1.2) * 50
width = abs(sin(phy1 * 1.1) * 10)
line(x - width - 5, y, x - width, y, 0x1100.5a5a)
line(x - width, y, x + width, y, flr((y + col * 1.5) / 4 % 15) + 0x1000.0000)
phy += 0.005
phy1 += 0.005
end
ph += 0.004
ph1 += 0.008
col += 1
yield()
end
end
function board()
local ph, phw, oy, x, x1, toy, phy, width = 0, 0, 0, false
while true do
phy = ph
toy = oy
color(0x5)
fillp(frameflag and 0xa5a5.8 or 0x5a5a.8)
for y = 0, 127 do
x = 64 + sin(phy) * 20
width = 30 + sin(phw) * 6
if (toy % 32 < 16) x -= width
x1 = x
while x1 > -width do
line(x1, y, x1 + width - 1, y)
x1 -= width * 2
end
x1 = x
while x1 < 128 + width do
line(x1, y, x1 + width - 1, y)
x1 += width * 2
end
phy += 0.001
toy += 1 + sin(phw * 1.2) * 0.1
end
ph += 0.001
phw += 0.002
oy += 1
yield()
end
end
__gfx__
00000000aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00077000aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00700700aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000aaaaaaaa1111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__map__
0101020102020102010201020102010201020102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0202010201010201020102010201020102010201000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0101020102020102010201020102010201020102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0202010201010201020102010201020102010201000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0102010201020102010201020102010201020102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0201020102010201020102010201020102010201000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0102010201020102010201020102010201020102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0201020102010201020102010201020102010201000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0102010201020102010201020102010200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0201020102010201020102010201020100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0102010201020102010201020102010200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0201020102010201020102010201020100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
__sfx__
011000000c7750c535182750c375184750c1750c235183750c4750c735181750c375185750c7750c335187750c2750c235181750c775184750c3750c735181750c7750c235187750c375185750c4750c33518275
01100000180761b0761f06622066180561b0561f04622046180361b0361f02622026180161b0161f0162201613500165000c5000f50013500165000c5000f50013500165000c5000f50000000000000000000000
01100000180761b0761f06621066180561b0561f04621046180361b0361f02621026180161b0161f0162101600000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011000000c7750c535182750c375184750c1750c235183750c4750c735181750c375185750c7750c335187750c2750c235181750c775184750c3750c735181750c7750c235187750c375185750c4750c33518275
011000001897018970189701897018970189701897018970189701897018970189701897018970189701897018a7018a7018a7018a7018a7018a7018a7018a7018a7018a7018a7018a7018a7018a7018a7018a70
__music__
01 08094344
02 08424344