← Monstruos y enemigosObjeto 3Dfogon/bomba-con-patas
Bomba con patas
Arrastrá para girarlo// «Bomba con patas» · gpt-6-sol (medium)
// A cartoon walking bomb facing -y: a round shiny black bomb body with a highlight, angry white eyes with eyebrows, a short brass fuse cap on top with a lit sparking fuse, and two little orange legs with big feet.
// Round bomb body: dark at the bottom, cool highlights toward the upper front.
for (let x = 7; x <= 41; x++) {
for (let y = 7; y <= 41; y++) {
for (let z = 3; z <= 37; z++) {
const dx = (x - 24) / 16.5;
const dy = (y - 24) / 16.5;
const dz = (z - 20) / 16.5;
if (dx * dx + dy * dy + dz * dz > 1) continue;
let color = "#171923";
if (z < 12) color = "#0d0e16";
else if (z > 22 && x < 27 && y < 27) color = "#252a37";
if (z > 29 && x < 22 && y < 24) color = "#303747";
if (rand() < 0.035) color = z < 15 ? "#151720" : "#2c303d";
set(x, y, z, color);
}
}
}
// Broad reflected sheen and two crisp glints on the visible front.
ellipsoid(16, 10, 28, 5, 1, 3, "#3b4354");
ellipsoid(14, 9, 30, 2, 1, 2, "#717e90");
box(12, 8, 31, 14, 8, 32, "#a7b3bd");
box(34, 14, 29, 35, 14, 30, "#3d4451");
// Brass socket, recessed band, and a chunky rolled rim.
cylinder(24, 24, 35, 5, 4, "#a7651d");
cylinder(24, 24, 36, 4, 3, "#df9b35");
box(20, 19, 37, 22, 20, 38, "#f9c45d");
cylinder(24, 24, 39, 5, 1, "#f4b747");
box(20, 19, 39, 22, 20, 39, "#ffe08a");
box(26, 28, 36, 28, 28, 38, "#80501c");
// Angry eyes: dark outlines, white sclera, and glowing golden irises.
for (const cx of [17, 31]) {
ellipsoid(cx, 9, 26, 5, 3, 4, "#0b0c13");
ellipsoid(cx, 7, 26, 4, 2, 3, "#f2f3eb");
ellipsoid(cx - 1, 6, 27, 2, 1, 2, "#ffffff");
}
ellipsoid(19, 5, 25, 2, 1, 2, "#ffbb35");
ellipsoid(29, 5, 25, 2, 1, 2, "#ffbb35");
box(19, 4, 25, 19, 4, 26, "#382017");
box(29, 4, 25, 29, 4, 26, "#382017");
set(18, 3, 26, "#fff5b0");
set(28, 3, 26, "#fff5b0");
// Slanted brows converge toward the middle for a comically fierce glare.
line(12, 5, 32, 21, 5, 29, 1, "#090a10");
line(27, 5, 29, 36, 5, 32, 1, "#090a10");
line(13, 4, 33, 18, 4, 31, 0, "#383b48");
line(30, 4, 31, 35, 4, 33, 0, "#383b48");
// Little crooked grin beneath the eyes.
line(20, 8, 16, 27, 8, 15, 1, "#080910");
set(21, 7, 16, "#fff0ce");
set(22, 7, 16, "#fff0ce");
set(27, 7, 16, "#fff0ce");
// Legs are separate swinging parts, hinged inside the bomb.
for (const [name, cx, speed] of [
["leftLeg", 17, 7],
["rightLeg", 31, -7]
]) {
part(name, [cx, 24, 9]);
box(cx - 3, 21, 3, cx + 3, 27, 9, "#ad421b");
box(cx - 2, 20, 3, cx + 2, 23, 8, "#f47a26");
box(cx - 4, 13, 0, cx + 4, 26, 3, "#a83b18");
box(cx - 4, 12, 1, cx + 4, 23, 4, "#ef6820");
box(cx - 3, 12, 3, cx + 3, 20, 4, "#ff9935");
box(cx - 3, 12, 0, cx + 3, 13, 1, "#803019");
animate(name, { type: "swing", axis: "x", speed, amplitude: 0.3 });
}
part("body", [24, 24, 20]);
// Stubby, slightly bent fuse.
box(23, 23, 40, 25, 25, 41, "#49301d");
box(24, 22, 42, 25, 24, 43, "#76512d");
set(24, 22, 42, "#c89048");
// The entire spark flickers, including its radiating points.
part("fuseSpark", [25, 23, 43]);
sphere(25, 23, 44, 2, "#ffb322");
set(25, 23, 46, "#fff5a3");
set(25, 23, 41, "#f15b16");
set(21, 23, 44, "#ff9a19");
set(29, 23, 44, "#fff2a0");
set(25, 19, 44, "#ffdd49");
set(25, 27, 44, "#f76b16");
set(22, 21, 45, "#fff3aa");
set(28, 25, 45, "#ff8720");
animate("fuseSpark", {
type: "colors",
palette: ["#ffe53d", "#ff841c", "#fffbe3", "#fa3d18"],
pattern: "flicker",
glow: 1
});import { draw } from "./assets/voxel";
import { bombaConPatas } from "./assets/bomba-con-patas";
// En cada cuadro: parado sobre (x, y), el centro de su base.
draw(ctx, bombaConPatas, 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 bomba-con-patas
# Con las herramientas de Fogón (conector)
add_assets({ slug: "<tu-juego>", ids: ["bomba-con-patas"] })
# Queda en client/assets/bomba-con-patas.ts
# https://fogon.page/object/bomba-con-patas