← MedievalObjeto 3Dfogon/escalera-de-mazmorra
Escalera de mazmorra
Arrastrá para girarlo// «Escalera de mazmorra» · gpt-6-sol (medium)
// A stone staircase going down into a dungeon: a square block of dark grey stone with a rectangular opening on top and steep stone steps descending into darkness inside, a low stone railing on two sides, a rusty iron gate folded open at the top and a little moss and cobwebs on the corners.
const stone = "#716f6a";
const stoneLight = "#928e84";
const stoneMid = "#807d75";
const stoneDark = "#53544f";
const mortar = "#595a55";
const shadow = "#242725";
const moss = "#61734b";
const mossDark = "#44583d";
const iron = "#292c2b";
const rust = "#80503b";
// Broad, solid foundation and the square stone mass.
box(4, 5, 0, 43, 42, 2, stoneDark);
box(6, 7, 3, 41, 40, 14, stone);
box(5, 6, 2, 42, 41, 3, stoneMid);
// The stairwell is cut deeply into the top.
box(14, 11, 4, 33, 35, 18, null);
box(14, 11, 3, 33, 35, 3, shadow);
// Courses of hand-laid masonry on the exposed outside walls.
for (const z of [4, 8, 12]) {
for (let x = 6; x <= 41; x++) {
set(x, 7, z, mortar);
set(x, 40, z, mortar);
}
for (let y = 7; y <= 40; y++) {
set(6, y, z, mortar);
set(41, y, z, mortar);
}
}
for (let z = 4; z <= 13; z += 4) {
const offset = (z / 4 | 0) % 2 ? 3 : 0;
for (let x = 9 + offset; x < 41; x += 7) {
for (let dz = 1; dz < 4; dz++) set(x, 7, z + dz, mortar);
}
for (let y = 10 + offset; y < 40; y += 7) {
for (let dz = 1; dz < 4; dz++) {
set(6, y, z + dz, mortar);
set(41, y, z + dz, mortar);
}
}
}
// Uneven, warm-grey stones on the top and a substantial dressed rim.
for (let x = 7; x <= 40; x += 4) {
for (let y = 8; y <= 39; y += 4) {
if (get(x, y, 14) && rand() > 0.27) {
box(x, y, 14, Math.min(x + 2, 40), Math.min(y + 2, 39), 14,
rand() > 0.5 ? stoneMid : stoneLight);
}
}
}
box(11, 9, 14, 36, 10, 15, stoneLight);
box(12, 10, 14, 13, 36, 15, stoneMid);
box(34, 10, 14, 35, 36, 15, stoneMid);
box(12, 36, 14, 35, 37, 15, stoneLight);
for (let y = 12; y <= 34; y += 5) {
box(12, y, 15, 13, y + 1, 15, stoneLight);
box(34, y, 15, 35, y + 1, 15, stoneLight);
}
// Dark, narrow inner walls; the far end disappears into a dungeon doorway.
box(14, 12, 4, 14, 35, 12, stoneDark);
box(33, 12, 4, 33, 35, 12, stoneDark);
box(18, 35, 4, 29, 35, 10, "#171b1a");
box(17, 35, 4, 17, 35, 10, stoneMid);
box(30, 35, 4, 30, 35, 10, stoneMid);
box(18, 35, 11, 29, 35, 11, stoneMid);
box(19, 35, 12, 28, 35, 12, stoneDark);
// Wide, steep treads: pale tops, shadowed front risers.
for (let i = 0; i < 10; i++) {
const y = 12 + i * 2;
const h = 13 - i;
box(15, y, 4, 32, y + 1, h, i % 3 === 0 ? stoneMid : stone);
box(15, y, h, 32, y + 1, h, i % 3 === 1 ? stoneLight : stoneMid);
box(15, y, 4, 32, y, h - 1, stoneDark);
for (let x = 17 + i % 3; x <= 30; x += 6) {
if (rand() > 0.25) set(x, y + 1, h, stoneLight);
}
}
box(15, 32, 3, 32, 34, 3, stoneDark);
// Low, chunky railings and capped posts on both sides.
for (const x of [10, 36]) {
box(x, 10, 15, x + 2, 35, 17, stone);
box(x, 10, 18, x + 2, 35, 18, stoneLight);
box(x - 1, 9, 15, x + 3, 12, 20, stoneMid);
box(x - 1, 9, 20, x + 3, 12, 20, stoneLight);
box(x - 1, 33, 15, x + 3, 36, 19, stoneMid);
box(x - 1, 33, 19, x + 3, 36, 19, stoneLight);
for (const y of [15, 21, 27]) {
box(x, y, 18, x + 2, y + 2, 19, stoneMid);
box(x, y, 20, x + 2, y + 2, 20, stoneLight);
}
}
// One rusty gate leaf, swung back along the right-hand wall.
box(33, 11, 16, 33, 23, 16, iron);
box(33, 11, 23, 33, 23, 23, iron);
box(33, 11, 16, 33, 11, 23, iron);
box(33, 23, 16, 33, 23, 23, iron);
for (const y of [14, 17, 20]) box(33, y, 17, 33, y, 22, iron);
box(33, 11, 19, 33, 23, 19, rust);
for (const y of [12, 16, 20, 23]) {
set(32, y, 16, rust);
set(32, y, 23, "#a26843");
}
box(34, 10, 17, 35, 11, 18, iron);
box(34, 10, 21, 35, 11, 22, iron);
// Moss clings to damp corners and a few cracks.
for (const [x, y] of [[7, 8], [8, 8], [39, 8], [40, 9],
[8, 38], [39, 38], [12, 33], [35, 33],
[12, 11], [36, 11]]) {
for (let j = 0; j < 8; j++) {
const xx = x + Math.floor(rand() * 4) - 1;
const yy = y + Math.floor(rand() * 4) - 1;
const zz = get(xx, yy, 20) ? 21 : get(xx, yy, 19) ? 20 : 15;
if (get(xx, yy, zz - 1) && !get(xx, yy, zz))
set(xx, yy, zz, rand() > 0.45 ? moss : mossDark);
}
}
for (const [x, y, z] of [[8, 7, 9], [39, 7, 6], [6, 38, 11]]) {
set(x, y, z, mossDark);
set(x + 1, y, z, moss);
set(x, y, z - 1, moss);
}
// Fine pale cobwebs tucked beneath the rear corners of the opening.
const web = "#b5b3a3";
for (const [x, dx] of [[15, 1], [32, -1]]) {
line(x, 34, 15, x + dx * 5, 34, 12, 0, web);
line(x, 34, 15, x + dx * 4, 30, 12, 0, web);
line(x, 34, 15, x, 29, 12, 0, web);
line(x + dx, 33, 14, x + dx * 4, 33, 13, 0, web);
}import { draw } from "./assets/voxel";
import { escaleraDeMazmorra } from "./assets/escalera-de-mazmorra";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, escaleraDeMazmorra, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: lo que mide en px su lado más largo
// angle: giro sobre el piso, en radianes
// t: segundos; si se mueve, se anima solo con eso# En una terminal, en la carpeta del juego
fogon assets add escalera-de-mazmorra
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["escalera-de-mazmorra"] })
# Queda en client/assets/escalera-de-mazmorra.ts
# https://fogon.page/object/escalera-de-mazmorra