├── .gitignore ├── PICO-8.ttf ├── palette.png ├── palette.xcf ├── unicorn.png ├── controls.png ├── screensize.png ├── screensize.xcf ├── palette_numbers.png ├── picoPalette.pyxel ├── picoPalette_palette.png ├── README.md ├── main.css ├── index_en.html ├── index.html ├── index_fr.html ├── tracker.svg └── controls.svg /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /PICO-8.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/PICO-8.ttf -------------------------------------------------------------------------------- /palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/palette.png -------------------------------------------------------------------------------- /palette.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/palette.xcf -------------------------------------------------------------------------------- /unicorn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/unicorn.png -------------------------------------------------------------------------------- /controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/controls.png -------------------------------------------------------------------------------- /screensize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/screensize.png -------------------------------------------------------------------------------- /screensize.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/screensize.xcf -------------------------------------------------------------------------------- /palette_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/palette_numbers.png -------------------------------------------------------------------------------- /picoPalette.pyxel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/picoPalette.pyxel -------------------------------------------------------------------------------- /picoPalette_palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztiromoritz/pico-8-spick/HEAD/picoPalette_palette.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pico-8-spick 2 | A PICO-8 Cheatsheet. Intended to be helpfull for people learning and having fun with PICO-8 and Lua. 3 | * [German](https://github.com/ztiromoritz/pico-8-spick/raw/master/build/pico-8-spickzettel.pdf) 4 | * [English](https://github.com/ztiromoritz/pico-8-spick/raw/master/build/pico-8-cheatsheet.pdf) 5 | * [French](https://github.com/ztiromoritz/pico-8-spick/raw/master/build/pico-8-antiseche.pdf) 6 | -------------------------------------------------------------------------------- /main.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "pico8"; 3 | src: url("./PICO-8.ttf"); 4 | } 5 | 6 | * { 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | * { 12 | -webkit-padding-start: 0px; 13 | } 14 | 15 | body { 16 | background-color: #aaa; 17 | } 18 | 19 | .page { 20 | font-family: Courier, monospace; 21 | height: 277mm; 22 | width: 210mm; 23 | margin: 0 auto; 24 | background-color: #fff; 25 | /* background-color: #ff00ff; */ 26 | } 27 | 28 | .title { 29 | width: 205mm; 30 | height: 1mm; 31 | margin: 2.5mm; 32 | padding-top: 3mm; 33 | font-family: pico8, monospace; 34 | font-size: 10px; 35 | /*background-color: #00ff00;*/ 36 | } 37 | 38 | .column { 39 | height: 287mm; 40 | width: 65mm; 41 | margin: 2.5mm; 42 | /*background-color: #00ff00; */ 43 | float: left 44 | } 45 | 46 | .block { 47 | width: 100%; 48 | background-color: #eee; 49 | margin-top: 1mm; 50 | margin-bottom: 0mm; 51 | background-color: #eee; 52 | } 53 | 54 | .shortcut { 55 | font-size: 14px; 56 | } 57 | 58 | .block h3 { 59 | margin-top: 1mm; 60 | margin-left: 1mm; 61 | margin-bottom: 1mm; 62 | 63 | 64 | } 65 | 66 | .block h4 { 67 | margin-top: 2mm; 68 | } 69 | 70 | pre, 71 | .gray { 72 | background-color: #ddd; 73 | } 74 | 75 | code::first-line { 76 | line-height: 0px; 77 | } 78 | 79 | code { 80 | font-family: pico8, monospace; 81 | line-height: 1.4; 82 | font-size: 11px; 83 | } 84 | 85 | .pdf { 86 | font-family: pico8, monospace; 87 | font-size: 12px; 88 | padding: 5px; 89 | width: 180px; 90 | height: 80px; 91 | line-height: 1.4; 92 | background-color: white; 93 | position: absolute; 94 | right: 10px; 95 | top: 10px; 96 | } 97 | 98 | pre,p { 99 | padding-left:1mm; 100 | } 101 | p { 102 | font-size: 11px; 103 | } 104 | 105 | @media print { 106 | .pdf { 107 | display: none; 108 | } 109 | } 110 | 111 | .musicoverlay { 112 | display: block; 113 | font-weight: bolder; 114 | font-face: monospace; 115 | font-size: 24px; 116 | background-color: #ddd; 117 | position: absolute; 118 | } 119 | .ov_effect { 120 | top: 2px; 121 | left: 157px; 122 | width: 83px; 123 | } 124 | .ov_instrument { 125 | top: 2px; 126 | left: 2px; 127 | width: 140px; 128 | } 129 | .ov_tone { 130 | top: 31px; 131 | left: 2px; 132 | width: 70px; 133 | } 134 | .ov_octave { 135 | top: 67px; 136 | left: 3px; 137 | width: 95px; 138 | } 139 | .ov_volume { 140 | top: 67px; 141 | left: 101px; 142 | width: 110px; 143 | } 144 | 145 | -------------------------------------------------------------------------------- /index_en.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |
22 | HELP
23 | SAVE GAME.P8
24 | LOAD GAME.P8
25 | RUN
26 | SPLORE
27 |
28 | A=nil
34 | X=23
35 | local S="TEXT"
36 | T={name="Joe", age="32"}
37 |
38 | + - * / ^ %
43 | < > <= >= ~= ==
44 | #list "A".."B"
45 | and or not
46 |
47 | FUNCTION ADD(a,b)
53 | RETURN A+B
54 | END
55 | IF (X < 33) THEN
61 | PRINT("HALLO")
62 | else
63 | print("hey")
64 | END
65 | --UP
70 | FOR I = 1,10 DO
71 | PRINT(I)
72 | END
73 |
74 | --DOWN
75 | FOR A=10,0,-2 DO
76 | PRINT(A)
77 | END
78 |
79 | --ARRAY
80 | FOR S IN ALL(SHIPS) DO
81 | PRINT(S.NAME)
82 | END
83 |
84 | --Table
85 | FOR K,V IN PAIRS(M) DO
86 | PRINT("K:"..K..",V:"..V)
87 | END
88 |
89 |
90 |
91 | t={a="x",b=1}
95 | add(t, v)
96 | del(t, v)
97 | t={1,2,3,4}
98 | print(t[1]) --1-based!!
99 | _init() _update() _draw()
107 | spr(n, x, y, [w, h],
111 | [flip_x], [flip_y])
112 | sspr(sx, sy, sw, sh,
113 | dx, dy, [dw, dh],
114 | [flip_x], [flip_y])
115 |
119 |
120 | pset(x, y, [c])
124 | pget(x,y)
125 |
126 | rect(x0,y0,x1,y1, [col])
130 | rectfill(x0,y0,x1,y1,[c])
131 | circ(x, y, r, [c])
132 | circfill(x, y, r, [c])
133 | line(x0, y0, x1, y1, [c])
134 | cls()
138 | camera([x, y])
139 | clip([x, y, w, h])
140 |
141 |
142 | mget(x, y)
146 | mset(x, y, v)
147 | map(map_x, map_y,
148 | screen_x, screen_y,
149 | width, height, [layer])
150 |
151 |
164 |
166 | Player 1:
167 |
⬅︎⬆︎⬇︎➡︎ Y,X/C,V/N,M
168 |
Player 2:
169 |
ASDF, LSHIFT, A
170 |
171 |
btn([i, [p]])
173 | btnp([i, [p]])
174 | sfx(n, [chan, offset])
180 | music([n, [fade, mask]])
181 | 0 none
188 | 1 slide
189 | 2 vibrato
190 | 3 drop (drum)
191 | 4 fade in
192 | 5 fade out
193 | 6 fast arpeggio
194 | 7 slow arpeggio
195 | abs(x),atan2(dx, dy),
199 | cos(x),sin(x),
200 | flr(x),max(x,y),min(x,y),
201 | rnd(x),sgn(x),sqrt(x)
202 |
22 | HELP
23 | SAVE GAME.P8
24 | LOAD GAME.P8
25 | RUN
26 | SPLORE
27 |
28 | A=nil
34 | X=23
35 | S="TEXT"
36 | T={ name="Moritz",
37 | loc="Dortmund"}
38 |
39 | + - * / ^ %
44 | < > <= >= ~= ==
45 | #list "A".."B"
46 | and or not
47 |
48 | FUNCTION ADD(a,b)
54 | RETURN A+B
55 | END
56 | IF (X < 33) THEN
62 | PRINT("HALLO")
63 | else
64 | print("hey")
65 | END
66 | --RAUF
71 | FOR I = 1,10 DO
72 | PRINT(I)
73 | END
74 |
75 | --RUNTER
76 | FOR A=10,0,-2 DO
77 | PRINT(A)
78 | END
79 |
80 | --ARRAY
81 | FOR S IN ALL(SHIPS) DO
82 | PRINT(S.NAME)
83 | END
84 |
85 | --TABELLE
86 | FOR K,V IN PAIRS(M) DO
87 | PRINT("K:"..K..",V:"..V)
88 | END
89 |
90 |
91 |
92 | t={a="x",b=1}
96 | add(t, v)
97 | del(t, v)
98 | t={1,2,3,4}
99 | print(t[1]) --1-basiert!!
100 | _init() _update() _draw()
108 | spr(n, x, y, [w, h],
113 | [flip_x], [flip_y])
114 | sspr(sx, sy, sw, sh,
115 | dx, dy, [dw, dh],
116 | [flip_x], [flip_y])
117 |
122 |
123 | pset(x, y, [c])
127 | pget(x,y)
128 |
129 | rect(x0,y0,x1,y1, [col])
133 | rectfill(x0,y0,x1,y1,[c])
134 | circ(x, y, r, [c])
135 | circfill(x, y, r, [c])
136 | line(x0, y0, x1, y1, [c])
137 | cls()
141 | camera([x, y])
142 | clip([x, y, w, h])
143 |
144 |
145 | mget(x, y)
149 | mset(x, y, v)
150 | map(map_x, map_y,
151 | screen_x, screen_y,
152 | width, height, [layer])
153 |
154 |
167 |
169 | Player 1:
170 |
⬅︎⬆︎⬇︎➡︎ C,V bzw. N,M
171 |
Player 2:
172 |
ASDF, LSHIFT, A
173 |
174 |
btn([i, [p]])
176 | btnp([i, [p]])
177 | sfx(n, [chan, offset])
183 | music([n, [fade, mask]])
184 | 0 none
191 | 1 slide
192 | 2 vibrato
193 | 3 drop (drum)
194 | 4 fade in
195 | 5 fade out
196 | 6 fast arpeggio
197 | 7 slow arpeggio
198 | abs(x),atan2(dx, dy),
202 | cos(x),sin(x),
203 | flr(x),max(x,y),min(x,y),
204 | rnd(x),sgn(x),sqrt(x)
205 |
22 | HELP
23 | SAVE GAME.P8
24 | LOAD GAME.P8
25 | RUN
26 | SPLORE
27 |
28 | A=nil
34 | X=23
35 | local S="TEXT"
36 | T={name="Joe", age="32"}
37 |
38 | + - * / ^ %
43 | < > <= >= ~= ==
44 | #list "A".."B"
45 | and or not
46 |
47 | FUNCTION ADD(a,b)
53 | RETURN A+B
54 | END
55 | IF (X < 33) THEN
61 | PRINT("HALLO")
62 | else
63 | print("hey")
64 | END
65 | --Incrementer
70 | FOR I = 1,10 DO
71 | PRINT(I)
72 | END
73 |
74 | --Decrementer
75 | FOR A=10,0,-2 DO
76 | PRINT(A)
77 | END
78 |
79 | --Collection
80 | FOR S IN ALL(SHIPS) DO
81 | PRINT(S.NAME)
82 | END
83 |
84 | --Table
85 | FOR K,V IN PAIRS(M) DO
86 | PRINT("K:"..K..",V:"..V)
87 | END
88 |
89 |
90 |
91 | t={a="x",b=1}
95 | add(t, v)
96 | del(t, v)
97 | t={1,2,3,4}
98 | print(t[1]) --Commence A 1!
99 | _init() _update() _draw()
107 | spr(n, x, y, [w, h],
111 | [flip_x], [flip_y])
112 | sspr(sx, sy, sw, sh,
113 | dx, dy, [dw, dh],
114 | [flip_x], [flip_y])
115 |
119 |
120 | pset(x, y, [c])
124 | pget(x,y)
125 |
126 | rect(x0,y0,x1,y1, [col])
130 | rectfill(x0,y0,x1,y1,[c])
131 | circ(x, y, r, [c])
132 | circfill(x, y, r, [c])
133 | line(x0, y0, x1, y1, [c])
134 | cls()
138 | camera([x, y])
139 | clip([x, y, w, h])
140 |
141 |
142 | mget(x, y)
146 | mset(x, y, v)
147 | map(map_x, map_y,
148 | screen_x, screen_y,
149 | width, height, [layer])
150 |
151 |
164 |
166 | Joueur 1:
167 |
⬅︎⬆︎⬇︎➡︎ Y,X/C,V/N,M
168 |
Joueur 2:
169 |
ASDF, LSHIFT, A
170 |
171 |
btn([i, [p]])
173 | btnp([i, [p]])
174 | sfx(n, [chan, offset])
180 | music([n, [fade, mask]])
181 | 0 aucun
190 | 1 glissando
191 | 2 vibrato
192 | 3 percussion
193 | 4 fondu ouverture
194 | 5 fondu fermeture
195 | 6 arpeggio rapide
196 | 7 arpeggio lent
197 | abs(x),atan2(dx, dy),
201 | cos(x),sin(x),
202 | flr(x),max(x,y),min(x,y),
203 | rnd(x),sgn(x),sqrt(x)
204 |