← Level kit3D assetfogon/nivel-pared-de-piedra
Pared de piedra
Drag to turn it// «Pared de piedra» · gpt-6-sol (medium)
// A modular castle stone wall segment: exactly 48 blocks long on x (x 0..47), 10 thick on y (y 19..28), 40 tall to the top of the battlements, flat ends so segments join seamlessly. Large irregular grey stone blocks (6-10 wide, 4-6 tall) in 3 shades with dark recessed mortar on the front and back faces, a few mossy green patches near the bottom. On top, crenellations: 8-block wide merlons 6 blocks tall separated by 4-block gaps, evenly spaced along x.
// Solid wall core; its ends remain flat for seamless tiling.
box(0, 19, 0, 47, 28, 33, "#89989c");
// One-block-deep recessed mortar behind both stone faces.
box(0, 19, 0, 47, 19, 33, "#66757a");
box(0, 28, 0, 47, 28, 33, "#66757a");
const heights = [6, 5, 6, 5, 6, 6];
const courses = [
[8, 8, 8, 8, 8, 8],
[7, 9, 7, 9, 7, 9],
[9, 7, 9, 7, 9, 7],
[8, 9, 7, 8, 9, 7],
[7, 8, 9, 7, 8, 9],
[9, 8, 7, 9, 8, 7]
];
const stone = ["#aab9bd", "#b9c5c7", "#9eafb4"];
let z0 = 0;
for (let row = 0; row < heights.length; row++) {
const z1 = z0 + heights[row] - 1;
let x0 = 0;
for (let i = 0; i < courses[row].length; i++) {
const x1 = x0 + courses[row][i] - 1;
const right = i === courses[row].length - 1 ? x1 : x1 - 1;
const top = row === heights.length - 1 ? z1 : z1 - 1;
const color = stone[(row * 2 + i) % stone.length];
for (const y of [19, 28]) {
box(x0, y, z0, right, y, top, color);
// Crisp light upper edges and a restrained shadow along the bottom.
if (top > z0) {
box(x0, y, top, right, y, top, "#c5ced0");
box(x0, y, z0, right, y, z0, "#95a6ab");
}
}
x0 = x1 + 1;
}
z0 = z1 + 1;
}
// Sparse moss tucked into the lower courses.
for (const y of [19, 28]) {
for (const [x, z, color] of [
[3, 1, "#78a775"], [4, 1, "#78a775"], [5, 2, "#8bb77d"],
[17, 2, "#65946d"], [18, 2, "#78a775"], [19, 3, "#8bb77d"],
[37, 1, "#65946d"], [38, 1, "#78a775"], [39, 2, "#8bb77d"],
[40, 1, "#78a775"]
]) set(x, y, z, color);
}
// Continuous pale walkway cap, visible in the crenel gaps.
box(0, 19, 33, 47, 28, 33, "#cbd3d1");
box(0, 19, 32, 47, 19, 32, "#a9b7b9");
box(0, 28, 32, 47, 28, 32, "#a9b7b9");
// Four eight-block merlons, spaced by four-block gaps.
// The final gap continues cleanly into the next wall segment.
for (const x of [0, 12, 24, 36]) {
box(x, 19, 34, x + 7, 28, 39, "#aab9bd");
box(x, 19, 34, x + 7, 19, 38, "#b9c5c7");
box(x, 19, 34, x + 7, 19, 34, "#87999e");
box(x + 7, 19, 35, x + 7, 19, 38, "#92a4a9");
box(x, 19, 39, x + 7, 28, 39, "#d0d8d5");
}import { draw } from "./assets/voxel";
import { nivelParedDePiedra } from "./assets/nivel-pared-de-piedra";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, nivelParedDePiedra, x, y, { size: 64, angle: 0, t: performance.now() / 1000 });
// size: its longest side, in px
// angle: turn on the floor, in radians
// t: seconds; if it moves, that animates it# In a terminal, in the game's folder
fogon assets add nivel-pared-de-piedra
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["nivel-pared-de-piedra"] })
# It lands in client/assets/nivel-pared-de-piedra.ts
# https://fogon.page/object/nivel-pared-de-piedra