Antisheches PICO-8

Ligne de commande

HELP
SAVE GAME.P8
LOAD GAME.P8
RUN
SPLORE

Variables & Types

A=nil
X=23
local S="TEXT"
T={name:"Joe", age:"32"}

Opérateurs

+ - * / ^ %
< > <= >= ~= ==
#list  "A".."B"
and or not

Fonctions

FUNCTION ADD(a,b)
 RETURN A+B
END

Bloc If

IF (X  < 33) THEN
 PRINT("HALLO")
else
 print("hey")
END

Boucles

--Incrementer
FOR I = 1,10 DO
 PRINT(I)
END

--Decrementer
FOR A=10,0,-2 DO
 PRINT(A)
END

--Collection
FOR S IN ALL(SHIPS) DO
 PRINT(S.NAME)
END

--Table
FOR K,V IN PAIRS(M) DO
 PRINT("K:"..K..",V:"..V)
END

Tableaux

t={a="x",b=1}
add(t, v)
del(t, v)
t={1,2,3,4}
print(t[1]) --Commence A 1!

Fonctions spéciales

_init() _update() _draw()

Sprites

spr(n, x, y, [w, h],
  [flip_x], [flip_y])
sspr(sx, sy, sw, sh,
  dx, dy, [dw, dh],
  [flip_x], [flip_y])

Couleurs

Pixel

pset(x, y, [c])
pget(x,y)

Formes

rect(x0,y0,x1,y1, [col])
rectfill(x0,y0,x1,y1,[c])
circ(x, y, r, [c])
circfill(x, y, r, [c])
line(x0, y0, x1, y1, [c])

Écran

cls()
camera([x, y])
clip([x, y, w, h])

Tilemap

mget(x, y)
mset(x, y, v)
map(map_x, map_y,
  screen_x, screen_y,
  width, height, [layer])

Contrôles

Joueur 1:
  ⬅︎⬆︎⬇︎➡︎ Y,X/C,V/N,M
Joueur 2:
  ASDF, LSHIFT, A

btn([i, [p]])
btnp([i, [p]]) 

Son

sfx(n, [chan, offset])
music([n, [fade, mask]])

Musique

effet
note
0 aucun
1 glissando
2 vibrato
3 percussion
4 fondu ouverture
5 fondu fermeture
6 arpeggio rapide
7 arpeggio lent

Maths

abs(x),atan2(dx, dy),
cos(x),sin(x),
flr(x),max(x,y),min(x,y),
rnd(x),sgn(x),sqrt(x)

Raccourcis

Communs:
 Sauver: CTRL+S
 Changer mode: ESC
 Relancer jeu: CTRL+R
Éditeur:
 Annuler: CTRL+Z
 Rétablir: CTRL+Y
 Chercher: CTRL+F
 Chercher suiv.: CTRL+G
 Fonction suiv.: Alt+⬆︎⬇︎
Pico-8 Cheatsheet. Version 2.1(fr). Collected by @ztiromoritz. French Translation by @gozilu. Font: Joseph White. TTF by RhythmLynx. Inspired by @neko250/pico-8 api and @obone/picozine-3.
Version Allemande
Version Anglaise
PDF (DE)
PDF (EN)
PDF (FR)