← City3D assetfogon/subibaja
Subibaja
Drag to turn it// «Subibaja» · gpt-6-sol (medium)
// A playground seesaw: a long plank along y painted in blue and red halves balanced on a yellow central pivot stand, with a handle and a seat near each end.
// Concrete footing with a dark, crisp edge.
box(17, 17, 0, 31, 31, 0, "#687372");
box(18, 18, 1, 30, 30, 1, "#d8d2bd");
for (let x = 19; x <= 29; x++)
for (let y = 19; y <= 29; y++)
if (rand() < 0.14) set(x, y, 1, "#e5deca");
// Two chunky yellow triangular supports, with a gap between them.
for (const x0 of [21, 26]) {
for (let z = 2; z <= 16; z++) {
const halfWidth = Math.floor((16 - z) * 0.43) + 1;
for (let y = 24 - halfWidth; y <= 24 + halfWidth; y++) {
box(x0, y, z, x0 + 1, y, z,
y === 24 - halfWidth ? "#ffdc55" :
y === 24 + halfWidth ? "#c99020" : "#f4ba31");
}
}
box(x0 - 1, 20, 2, x0 + 2, 28, 3, "#df9d24");
}
box(22, 23, 13, 26, 25, 15, "#e8a829");
for (const x of [20, 28])
for (const y of [20, 28])
set(x, y, 3, "#66716b");
// Fixed axle and its visible silver ends.
box(18, 24, 17, 30, 24, 17, "#778588");
box(18, 23, 16, 19, 25, 18, "#aab5ae");
box(29, 23, 16, 30, 25, 18, "#aab5ae");
set(18, 24, 17, "#dce4db");
set(30, 24, 17, "#dce4db");
// Everything above the axle rocks as one piece.
part("plank", [24, 24, 17]);
for (let y = 4; y <= 44; y++) {
const red = y < 24;
box(22, y, 17, 26, y, 17, red ? "#a8333e" : "#155879");
box(21, y, 18, 27, y, 18, red ? "#d84b52" : "#2682b1");
box(21, y, 19, 27, y, 19, red ? "#f26468" : "#38a3ce");
set(21, y, 19, red ? "#ff8580" : "#70c8dc");
set(27, y, 19, red ? "#c43e4b" : "#197198");
}
// A small gold band marks the balance point.
box(21, 23, 20, 27, 24, 20, "#ffd45b");
box(22, 23, 21, 26, 24, 21, "#f5b733");
// Broad, rounded-looking seats at both ends.
for (const seat of [
{ y0: 5, y1: 10, rim: "#a72e41", cushion: "#ff7771" },
{ y0: 38, y1: 43, rim: "#145777", cushion: "#5cc5dc" }
]) {
box(20, seat.y0, 20, 28, seat.y1, 20, seat.rim);
box(21, seat.y0 + 1, 21, 27, seat.y1 - 1, 21, seat.cushion);
set(20, seat.y0, 20, null);
set(28, seat.y0, 20, null);
set(20, seat.y1, 20, null);
set(28, seat.y1, 20, null);
}
// Dark-green iron grab handles, one in front of each seat.
for (const y of [13, 35]) {
for (const x of [20, 28]) {
box(x, y, 19, x, y, 25, "#194f47");
set(x, y, 25, "#3c8772");
}
box(20, y, 25, 28, y, 25, "#24705f");
box(22, y, 26, 26, y, 26, "#50a586");
for (const x of [20, 28]) set(x, y, 20, "#f3c444");
}
// Tiny gold pinstripes give the painted plank a toy-like finish.
for (const y of [16, 19, 29, 32])
box(23, y, 20, 25, y, 20, "#f7d168");
animate("plank", { type: "swing", axis: "x", speed: 2, amplitude: 0.3 });import { draw } from "./assets/voxel";
import { subibaja } from "./assets/subibaja";
// Every frame: standing on (x, y), the centre of its base.
draw(ctx, subibaja, 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 subibaja
# With Fogón's tools (connector)
add_assets({ slug: "<your-game>", ids: ["subibaja"] })
# It lands in client/assets/subibaja.ts
# https://fogon.page/object/subibaja