Crude, brute-force homage to one of the early dungeon crawler RPG games.
gog.com/game/akalabeth_world_of_doom
Log in to post a comment.
// base line-drawing code adapted from:
// "Alfred" by mrspeaker https://turtletoy.net/turtle/ba15abdde7
Canvas.setpenopacity(-1);
const turtle = new Turtle();
const bx = 35;
const by = 20;
var lines = [
// outline
[-99,-99, 99,-99], // top
[ 99,-99, 99, 99], // right
[ 99, 99,-99, 99], // bottom
[-99, 99,-99,-99], // left
// back wall
[-bx,-by, bx,-by], // top
[ bx,-by, bx, by], // right
[ bx, by,-bx, by], // bottom
[-bx, by,-bx,-by], // left
// right wall
[ bx,-by, 99,-by-30], // top
[ bx, by, 99, by+30], // bottom
// left wall
[-bx,-by,-99,-by-30], // top
[-bx, by,-99, by+30], // bottom
// door
[-bx-30,-by+54,-bx-30,-by ], // left
[-bx-15,-by+47,-bx-15,-by+5], // right
[-bx-30,-by, -bx-15,-by+5], // top
// ceiling trapdoor
[-bx+18,-by-15, bx-18,-by-15], // top
[-bx+23,-by -7, bx-23,-by-7 ], // bottom
[-bx+18,-by-15,-bx+23,-by-7 ], // side
[ bx-18,-by-15, bx-23,-by-7 ], // side
// ladder
[ bx-27,-by-15, bx-27, by+15], // right
[ bx-43,-by-15, bx-43, by+15], // left
[ bx-43, by+ 5, bx-27, by+ 5], // bar
[ bx-43, by- 9, bx-27, by -9], // bar
[ bx-43, by-23, bx-27, by-23], // bar
[ bx-43, by-37, bx-27, by-37], // bar
[ bx-43, by-51, bx-27, by-51], // bar
];
function walk(i) {
const line = lines[i];
turtle.penup();
turtle.goto(line[0], line[1]);
turtle.pendown();
turtle.goto(line[2], line[3])
return i < lines.length-1;
}