here is the new one
var character = {
x: 60,
y: 60
};
var oldpos = {
oldx: 60,
oldy: 60
};
var background = getMap("map");
paper(4);
exports.update = function () {
if (background.get(character.x, character.y) ==! null) character.x = oldpos.oldx;
if (background.get(character.x, character.y) ==! null) character.y = oldpos.oldy;
oldpos.oldx = character.x;
oldpos.oldy = character.y;
if (btn.right) character.x += 1;
if (btn.left) character.x -= 1;
if (btn.up) character.y -= 1;
if (btn.down) character.y += 1;
cls();
draw(background, 0, 0);
sprite(206, character.x, character.y);
};