← Level pieces 23D assetfogon/nivel-aplastador
Bloque aplastador
Drag to turn it// «Bloque aplastador» · gpt-6-sol (medium)
// A crushing block trap (thwomp style): a heavy square stone block 32x32x24 (x 8..39, y 8..39) with angry carved eyes and gritted teeth on the front face (-y), grey stone in 3 shades with big iron spikes 3 blocks long along its bottom edge, floating with its bottom at z 20; under it, a cracked stone floor plate 48x48 x 3 thick (z 0..2).
// Cracked stone floor plate: exact 48 × 48 footprint.
box(0, 0, 0, 47, 47, 1, "#858d96");
box(0, 0, 2, 47, 47, 2, "#b6bec5");
// Sparse, clean stone variation.
for (let y = 2; y < 46; y++) {
for (let x = 2; x < 46; x++) {
if (rand() < 0.025) set(x, y, 2, "#a7b0b8");
}
}
// Branching cracks, kept away from tile edges.
const crack = "#68737d";
line(3, 14, 2, 12, 14, 2, 0, crack);
line(12, 14, 2, 17, 18, 2, 0, crack);
line(17, 18, 2, 23, 18, 2, 0, crack);
line(12, 14, 2, 15, 9, 2, 0, crack);
line(23, 18, 2, 27, 22, 2, 0, crack);
line(42, 34, 2, 34, 34, 2, 0, crack);
line(34, 34, 2, 29, 30, 2, 0, crack);
line(34, 34, 2, 32, 39, 2, 0, crack);
line(8, 38, 2, 14, 35, 2, 0, crack);
line(14, 35, 2, 19, 37, 2, 0, crack);
// The floating crusher and all its spikes move together.
part("bloque", [24, 24, 32]);
const stone = "#929ba4";
const light = "#b6bec5";
const dark = "#68737d";
const deep = "#424c57";
box(8, 8, 20, 39, 39, 43, stone);
// Broad, crisp lighting planes.
box(8, 8, 43, 39, 39, 43, light);
box(8, 8, 20, 39, 8, 42, "#a6afb7");
box(8, 8, 20, 8, 39, 42, "#78838d");
box(39, 9, 20, 39, 39, 42, "#818c96");
box(9, 39, 20, 38, 39, 42, dark);
// Chunky framing on the face.
box(8, 8, 20, 39, 8, 22, dark);
box(8, 8, 41, 39, 8, 42, light);
box(8, 8, 23, 10, 8, 40, dark);
box(37, 8, 23, 39, 8, 40, dark);
box(11, 8, 23, 36, 8, 23, light);
// A few broad stone patches, rather than noisy pixels.
box(12, 8, 32, 15, 8, 33, "#aeb7bf");
box(32, 8, 32, 35, 8, 34, "#87919a");
box(11, 8, 25, 12, 8, 28, "#87919a");
box(35, 8, 25, 36, 8, 29, "#b2bac2");
// Angry eye sockets.
box(13, 8, 32, 21, 8, 38, deep);
box(26, 8, 32, 34, 8, 38, deep);
box(14, 8, 33, 20, 8, 36, "#f2f3ed");
box(27, 8, 33, 33, 8, 36, "#f2f3ed");
// Inward-looking pupils.
box(18, 8, 33, 20, 8, 35, "#d35c48");
box(27, 8, 33, 29, 8, 35, "#d35c48");
box(19, 8, 33, 20, 8, 35, "#26313d");
box(27, 8, 33, 28, 8, 35, "#26313d");
set(19, 8, 35, "#ffffff");
set(28, 8, 35, "#ffffff");
// Heavy brows slope down toward the center.
for (let x = 12; x <= 22; x++) {
const z = Math.round(40 - (x - 12) * 0.4);
box(x, 8, z, x, 8, z + 1, dark);
}
for (let x = 25; x <= 35; x++) {
const z = Math.round(36 + (x - 25) * 0.4);
box(x, 8, z, x, 8, z + 1, dark);
}
// Wide black mouth with two rows of gritted stone teeth.
box(14, 8, 25, 33, 8, 30, deep);
box(15, 8, 29, 32, 8, 29, "#eef0eb");
box(15, 8, 26, 32, 8, 27, "#dce1df");
for (let x = 18; x <= 30; x += 4) {
set(x, 8, 29, deep);
set(x, 8, 27, deep);
set(x, 8, 26, deep);
}
box(13, 8, 25, 14, 8, 28, dark);
box(33, 8, 25, 34, 8, 28, dark);
// Small carved fractures beside the expression.
line(11, 8, 37, 12, 8, 35, 0, dark);
line(12, 8, 35, 11, 8, 33, 0, dark);
line(36, 8, 37, 35, 8, 35, 0, dark);
line(35, 8, 35, 36, 8, 33, 0, dark);
// Iron spikes: three blocks long, around the bottom perimeter.
const iron = "#596572";
const ironLight = "#a9b4bd";
function spike(x, y) {
set(x, y, 19, iron);
set(x, y, 18, ironLight);
set(x, y, 17, "#cbd2d6");
}
for (let x = 12; x <= 36; x += 6) {
spike(x, 10);
spike(x, 37);
}
for (let y = 16; y <= 34; y += 6) {
spike(10, y);
spike(37, y);
}
animate("bloque", { type: "bob", axis: "z", amplitude: 8, speed: 3 });import { draw } from "./assets/voxel";
import { nivelAplastador } from "./assets/nivel-aplastador";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, nivelAplastador, 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-aplastador
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["nivel-aplastador"] })
# It lands in client/assets/nivel-aplastador.ts
# https://fogon.page/object/nivel-aplastador