Skip to content

Instantly share code, notes, and snippets.

@m0ppers
Created May 16, 2017 22:29
Show Gist options
  • Save m0ppers/f474432a61ff145fbf0194c5a3e7b970 to your computer and use it in GitHub Desktop.
Save m0ppers/f474432a61ff145fbf0194c5a3e7b970 to your computer and use it in GitHub Desktop.
#l 2 4 images/kraft.png
#l 2 8 img/msgothic_16x16pn.png
pi $x, si 239, rnd $x
pi $y, si 239, rnd $y
pi $off, si 180
pi $a, si 40, rnd $a, add $off
pi $_, si 8, spt $_ // set sprite table to z=8
x $x,y $y, zi 4, spa $a // draw 32bit color sprite to ($x, $y, 4(,5,6,7) (= rgba buffer))
pi $l, si 5
pi $runs, si 50
pi $i, si 0
@beg
pi $x, si 0, rnd $x
pi $y, si 0, rnd $y
pi $v, si 0, rnd $v
pi $l, si 10, rnd $l
x $x, y $y, zi 4, s $v, sf $l
pi $_, si 1, pi $i, add $_
pi $_, s $runs, pi $i, seq $_, j @beg
pi $x, si 0, rnd $x // $x = random()
pi $y, si 3, rnd $y // $y = random() (in range of 0 - 3)
pi $v, si 0, rnd $v // $v = random()
x $x, y $y, zi 1, s $v // GLITCH!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment