Skip to content

Instantly share code, notes, and snippets.

@son-link
Last active June 22, 2019 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save son-link/dc73c2f4680adee104ea4333480dc89d to your computer and use it in GitHub Desktop.
Save son-link/dc73c2f4680adee104ea4333480dc89d to your computer and use it in GitHub Desktop.
SCRIPT-8
init = player => {
player.x = 24
}
update = (player, input) => {
if (input.leftPressed) {
player.x -= 16
}
if (input.rightPressed) {
player.x += 16
}
}
draw = player => {
clear()
map()
sprite(player.x+8, 96, 0)
sprite(player.x, 104, 0)
sprite(player.x+8, 104, 0)
sprite(player.x+16, 104, 0)
sprite(player.x+8, 112, 0)
sprite(player.x, 120, 0)
sprite(player.x+8, 120, 0)
sprite(player.x+16, 120, 0)
print(0,0,128/8)
}
{
"iframeVersion": "0.1.255",
"lines": [
28,
0,
0,
0,
0,
0,
0,
0
]
}
{
"0": [
"1111111 ",
"1 1 ",
"1 111 1 ",
"1 111 1 ",
"1 111 1 ",
"1 1 ",
"1111111 ",
" "
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment