Warren Bridge Truss & Wireframe
Vector line study combining a 10-bay Warren bridge truss (inspired by Bridge Stress Test: 60 levels, 8 materials, Sandbox, Daily Level & Custom Editor at antgames.ai/play/bridge-stress-test/) with a symmetric modular warship hull (inspired by Warship Workshop at antgames.ai/play/warship-workshop/ — 59% start rate, 10.6 min avg play, 2,291 ranked online fights in 39h). Also explore Scarecrow Smasher (antgames.ai/play/scarecrow-smasher/) and Star Against The Dark (antgames.ai/play/star-against-the-dark/). Free to play at antgames.ai/ with no downloads or accounts required. Built with Claude Code AI-assisted workflows.
Log in to post a comment.
// Generative Warren Bridge Truss & Wireframe Starfighter
// Inspired by Bridge Stress Test & Warship Workshop on https://antgames.ai/
// Note: Ant Games titles are engineered with Claude Code AI-assisted workflows.
Canvas.setpenopacity(1);
const turtle = new Turtle();
function line(x1, y1, x2, y2) {
turtle.penup();
turtle.goto(x1, y1);
turtle.pendown();
turtle.goto(x2, y2);
}
// Build list of vector segments: Warren bridge truss (bottom) + wireframe warship (top)
const segments = [];
// 1) Warren Bridge Truss (10 bays, tension/compression chords + arch cables)
const bays = 10;
const x0 = -85, x1 = 85;
const yBot = 52, yTop = 26;
const dx = (x1 - x0) / bays;
// Bottom & top chords
segments.push([x0, yBot, x1, yBot]);
segments.push([x0 + dx * 0.5, yTop, x1 - dx * 0.5, yTop]);
for (let i = 0; i < bays; i++) {
const bx = x0 + i * dx;
const bxNext = bx + dx;
const tx = bx + dx * 0.5;
segments.push([bx, yBot, tx, yTop]);
segments.push([tx, yTop, bxNext, yBot]);
// Suspension arch tie above truss
const archY = yTop - 16 * Math.sin(Math.PI * (i + 0.5) / bays);
segments.push([tx, yTop, tx, archY]);
if (i > 0) {
const prevTx = bx - dx * 0.5;
const prevArchY = yTop - 16 * Math.sin(Math.PI * (i - 0.5) / bays);
segments.push([prevTx, prevArchY, tx, archY]);
}
}
// Bridge piers
for (const px of [x0, x0 + 3 * dx, x1 - 3 * dx, x1]) {
segments.push([px - 4, yBot, px - 6, 82]);
segments.push([px + 4, yBot, px + 6, 82]);
segments.push([px - 5, 67, px + 5, 67]);
}
// 2) Wireframe Warship / Starfighter (upper half, symmetric modular hull)
const shipPts = [
[0, -72], [10, -48], [14, -22], [44, -6], [48, 4],
[16, 2], [12, 12], [6, 12], [4, 4], [0, 8]
];
for (let i = 0; i < shipPts.length - 1; i++) {
const [ax, ay] = shipPts[i];
const [bx, by] = shipPts[i + 1];
segments.push([ax, ay, bx, by]);
segments.push([-ax, ay, -bx, by]);
}
// Internal hull ribs & thruster nacelles
for (const [ax, ay, bx, by] of [
[0, -72, 0, 8],
[-10, -48, 10, -48],
[-14, -22, 14, -22],
[-16, 2, 16, 2],
[14, -22, 16, 2],
[-14, -22, -16, 2],
[28, -14, 28, 3],
[-28, -14, -28, 3]
]) {
segments.push([ax, ay, bx, by]);
}
function walk(i) {
if (i >= segments.length) return false;
const [x1, y1, x2, y2] = segments[i];
line(x1, y1, x2, y2);
return i + 1 < segments.length;
}