← Monsters and enemies3D assetfogon/dron-enemigo
Dron enemigo
Drag to turn it// «Dron enemigo» · gpt-6-sol (medium)
// A cartoon enemy drone hovering above the floor: a round dark grey body with a big glowing red camera eye on the front (-y), two small cannons underneath and four arms with propellers, one at each corner.
// A faint shadow anchors the hovering drone to the floor.
for (let x = 13; x <= 35; x++) {
for (let y = 16; y <= 32; y++) {
const d = ((x - 24) / 11) ** 2 + ((y - 24) / 8) ** 2;
if (d <= 1 && rand() > 0.12) {
set(x, y, 0, d < 0.55 ? "#252b35" : "#333a45");
}
}
}
part("body", [24, 24, 24]);
animate("body", { type: "bob", axis: "z", speed: 2, amplitude: 2 });
// Chunky armored body, with a dark lower edge and a lighter crown.
ellipsoid(24, 24, 24, 11, 10, 9, "#242a34");
ellipsoid(24, 24, 25, 10, 9, 8, "#48515e");
ellipsoid(24, 24, 28, 9, 8, 5, "#626c79");
forEach((x, y, z, color) => {
if (z >= 18 && z <= 31 && color === "#48515e" && rand() < 0.09) {
set(x, y, z, "#535d6a");
}
});
// Four diagonal arms and guarded rotor mounts.
const rotors = [
[9, 9], [39, 9],
[9, 39], [39, 39]
];
for (const [x, y] of rotors) {
const sx = x < 24 ? 17 : 31;
const sy = y < 24 ? 17 : 31;
line(sx, sy, 26, x, y, 29, 2, "#222b36");
line(sx, sy, 28, x, y, 30, 1, "#788695");
line(sx, sy, 29, x, y, 30, 0, "#33b9c7");
cylinder(x, y, 27, 3, 4, "#27323d");
cylinder(x, y, 30, 2, 2, "#8293a2");
// A stationary circular safety guard around each spinning blade.
for (let a = 0; a < 360; a += 4) {
const t = a * Math.PI / 180;
const gx = Math.round(x + 6 * Math.cos(t));
const gy = Math.round(y + 6 * Math.sin(t));
set(gx, gy, 32, "#26313d");
if (a % 12 === 0) set(gx, gy, 33, "#647584");
}
}
// Two little forward-pointing cannons below the eye.
for (const x of [20, 28]) {
box(x - 2, 16, 13, x + 2, 21, 17, "#242a34");
box(x - 1, 11, 12, x + 1, 17, 14, "#626c79");
box(x - 1, 10, 11, x + 1, 11, 15, "#202832");
set(x, 9, 13, "#61d6df");
set(x, 10, 15, "#8b9aa7");
}
// Oversized front-facing camera eye and its heavy dark bezel.
ellipsoid(24, 14, 25, 7, 3, 7, "#171d27");
ellipsoid(24, 11, 25, 6, 2, 6, "#90939b");
ellipsoid(24, 9, 25, 5, 2, 5, "#370e1b");
ellipsoid(24, 8, 25, 4, 1, 4, "#e72c39");
ellipsoid(24, 7, 25, 2, 1, 2, "#ff7149");
set(22, 7, 27, "#ffe1a2");
set(23, 7, 28, "#ffe1a2");
box(19, 11, 31, 29, 13, 32, "#26303b");
// Small status light on the crown.
cylinder(24, 24, 33, 2, 2, "#303a46");
set(24, 24, 35, "#49d4e1");
// Each propeller has its own spinning pivot.
for (let i = 0; i < rotors.length; i++) {
const [x, y] = rotors[i];
const name = `propeller_${i}`;
part(name, [x, y, 33]);
animate(name, { type: "spin", axis: "z", speed: 12 });
box(x - 5, y - 1, 33, x + 5, y + 1, 34, "#a0aeb9");
box(x - 1, y - 5, 33, x + 1, y + 5, 34, "#a0aeb9");
box(x - 5, y - 1, 34, x - 3, y + 1, 34, "#d7e2e8");
box(x + 3, y - 1, 34, x + 5, y + 1, 34, "#d7e2e8");
box(x - 1, y - 5, 34, x + 1, y - 3, 34, "#d7e2e8");
box(x - 1, y + 3, 34, x + 1, y + 5, 34, "#d7e2e8");
cylinder(x, y, 33, 2, 3, "#26313c");
set(x, y, 36, "#49d4e1");
}import { draw } from "./assets/voxel";
import { dronEnemigo } from "./assets/dron-enemigo";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, dronEnemigo, 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 dron-enemigo
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["dron-enemigo"] })
# It lands in client/assets/dron-enemigo.ts
# https://fogon.page/object/dron-enemigo